summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-02-05 02:44:37 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:24:19 -0700
commit51df9ee4965516b17dcd50647546ee970df87b32 (patch)
tree39bbca7fa44454a5fd83337a64324dae4f90ecf6 /Makefile
parent045b1f0f7a7af2182e7109f472d873f1cc0c5e4b (diff)
[PATCH] Makefile: add some more warnings and prepare for clean gcc4 compile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 052e41acc3..dc907f6a81 100644
--- a/Makefile
+++ b/Makefile
@@ -108,8 +108,12 @@ GCC_LIB := $(shell $(CC) -print-libgcc-file-name )
OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
then echo "-Os"; else echo "-O2" ; fi}
-# add -Wredundant-decls when libsysfs gets cleaned up
-WARNINGS := -Wall
+# check if compiler option is supported
+cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
+
+WARNINGS := -Wall -fno-builtin -Wchar-subscripts -Wpointer-arith -Wstrict-prototypes -Wsign-compare
+WARNINGS += $(call cc-supports,-Wno-pointer-sign)
+WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
CFLAGS := -pipe