1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
From: Debian DM Multipath Team <team+linux-blocks@tracker.debian.org>
Date: Wed, 23 Dec 2020 22:52:02 +0000
Subject: Update build flags
We have two missions:
1) ensure we build using the environment-supplied flags, especially
LDFLAGS, CFLAGS, CPPFLAGS
2) disable -Werror, as this can just break with newer GCC versions.
---
Makefile.inc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index e05f3a9..d816eab 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -94,10 +94,10 @@ ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers
WNOCLOBBERED := $(call TEST_CC_OPTION,-Wno-clobbered -Wno-error=clobbered,)
OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4
-WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 -Werror=implicit-int \
+WARNFLAGS := -Wall -Wextra -Wformat=2 -Werror=implicit-int \
-Werror=implicit-function-declaration -Werror=format-security \
$(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS)
-CPPFLAGS := -Wp,-D_FORTIFY_SOURCE=2
+CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) -Wp,-D_FORTIFY_SOURCE=2
CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \
-DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
-MMD -MP
|