From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 6475D5A0268; Tue, 15 Nov 2022 02:23:49 +0100 (CET) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 2/8] Makefile: Don't filter out -O2 from supplied flags for AVX2 builds Date: Tue, 15 Nov 2022 02:23:43 +0100 Message-Id: <20221115012349.2240096-3-sbrivio@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221115012349.2240096-1-sbrivio@redhat.com> References: <20221115012349.2240096-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: ZVUHKQIEX57AS55ZVOHZGIGB3W6CLI6R X-Message-ID-Hash: ZVUHKQIEX57AS55ZVOHZGIGB3W6CLI6R X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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 -- 2.35.1