diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-08-05 15:50:23 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-08-05 15:50:23 +0200 |
commit | 0d289184bf512efb27d805f993e6e2c76f0fe8b3 (patch) | |
tree | b3fef5a936646ecd7eebcda1d7ab39d7b38bd12a | |
parent | a5dee57033f7d9987858d2c0514f4e687ece2874 (diff) |
buildsys: check_gcc warning flags
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r-- | Rules.mak | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -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 |