From b501a8f274682dfcfc3db671f5ce4c114ab02f05 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Sun, 13 Nov 2022 01:37:50 +0100 Subject: 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 Reviewed-by: David Gibson --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a6e3164..f0b8e1d 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,7 @@ passt: $(PASST_SRCS) $(HEADERS) passt.avx2: FLAGS += -Ofast -mavx2 -ftree-vectorize -funroll-loops 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.avx2: passt -- cgit v1.2.3