[git commit master 1/1] buildsys: check_gcc warning flags

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Aug 5 13:50:23 UTC 2010


commit: http://git.uclibc.org/uClibc/commit/?id=0d289184bf512efb27d805f993e6e2c76f0fe8b3
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 Rules.mak |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/Rules.mak b/Rules.mak
index 03eea2c..1f05a8a 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -531,12 +531,25 @@ export ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && ec
 endif
 
 # Add a bunch of extra pedantic annoyingly strict checks
-XWARNINGS=$(call qstrip,$(WARNINGS)) -Wstrict-prototypes -fno-strict-aliasing
+XWARNINGS=$(call qstrip,$(WARNINGS)) 
+XWARNINGS+=$(foreach w,\
+	-Wstrict-prototypes \
+	-fno-strict-aliasing \
+	, $(call check_gcc,$(w),))
 ifeq ($(EXTRA_WARNINGS),y)
-XWARNINGS+=-Wnested-externs -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wformat=2
-XWARNINGS+=-Wmissing-prototypes -Wmissing-declarations
-XWARNINGS+=-Wold-style-declaration -Wold-style-definition
-XWARNINGS+=-Wnonnull -Wundef
+XWARNINGS+=$(foreach w,\
+	-Wformat=2 \
+	-Wmissing-noreturn \
+	-Wmissing-format-attribute \
+	-Wmissing-prototypes \
+	-Wmissing-declarations \
+	-Wnested-externs \
+	-Wnonnull \
+	-Wold-style-declaration \
+	-Wold-style-definition \
+	-Wshadow \
+	-Wundef \
+	, $(call check_gcc,$(w),))
 # Works only w/ gcc-3.4 and up, can't be checked for gcc-3.x w/ check_gcc()
 #XWARNINGS+=-Wdeclaration-after-statement
 endif
-- 
1.7.1



More information about the uClibc-cvs mailing list