Makefile: Don't filter out -O2 from supplied flags for AVX2 builds
Drop it from the internal FLAGS variable, but honour -O2 if passed in CFLAGS. In Debian packages, dpkg-buildflags uses it as hardening flag, and we get a QA warning if we drop it: https://qa.debian.org/bls/bytag/W-dpkg-buildflags-missing.html Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
b3c9e76dab
commit
b501a8f274
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -125,7 +125,7 @@ passt: $(PASST_SRCS) $(HEADERS)
|
||||||
|
|
||||||
passt.avx2: FLAGS += -Ofast -mavx2 -ftree-vectorize -funroll-loops
|
passt.avx2: FLAGS += -Ofast -mavx2 -ftree-vectorize -funroll-loops
|
||||||
passt.avx2: $(PASST_SRCS) $(HEADERS)
|
passt.avx2: $(PASST_SRCS) $(HEADERS)
|
||||||
$(CC) $(filter-out -O2,$(FLAGS) $(CFLAGS) $(CPPFLAGS)) \
|
$(CC) $(filter-out -O2,$(FLAGS)) $(CFLAGS) $(CPPFLAGS) \
|
||||||
$(PASST_SRCS) -o passt.avx2 $(LDFLAGS)
|
$(PASST_SRCS) -o passt.avx2 $(LDFLAGS)
|
||||||
|
|
||||||
passt.avx2: passt
|
passt.avx2: passt
|
||||||
|
|
Loading…
Reference in a new issue