rpm: use build flags provided by the distribution

Among other things, this enable various hardening options.

QubesOS/qubes-issues#2259

(cherry picked from commit 7667b0dc16)
This commit is contained in:
Marek Marczykowski-Górecki 2018-08-01 02:20:57 +02:00
parent 4aa3b5a4dd
commit c5cf843187
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 5 additions and 4 deletions

View File

@ -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
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
all: qrexec-agent qrexec-client-vm qrexec-fork-server
qrexec-agent: qrexec-agent.o qrexec-agent-data.o

View File

@ -205,6 +205,7 @@ ln -sf . %{name}-%{version}
%setup -T -D
%build
%{?set_build_flags}
for dir in qubes-rpc qrexec misc; do
(cd $dir; make)
done