Among other things, this enable various hardening options. QubesOS/qubes-issues#2259
@@ -1,7 +1,7 @@
-CC=gcc
-CFLAGS+=-I. -g -O2 -Wall -Wextra -Werror -pie -fPIC `pkg-config --cflags vchan-$(BACKEND_VMM)`
-LDFLAGS=-pie
-LDLIBS=`pkg-config --libs vchan-$(BACKEND_VMM)` -lqrexec-utils -lpam
+CC ?= gcc
+CFLAGS += -I. -g -O2 -Wall -Wextra -Werror -pie -fPIC `pkg-config --cflags vchan-$(BACKEND_VMM)`
+LDFLAGS += -pie
+LDLIBS = `pkg-config --libs vchan-$(BACKEND_VMM)` -lqrexec-utils -lpam
all: qrexec-agent qrexec-client-vm qrexec-fork-server
qrexec-agent: qrexec-agent.o qrexec-agent-data.o
@@ -269,6 +269,7 @@ Thunar support for Qubes VM tools
%setup -q
%build
+%{?set_build_flags}
for dir in qubes-rpc qrexec misc; do
make -C $dir BACKEND_VMM=@BACKEND_VMM@
done