aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-15 21:44:46 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-15 21:44:46 +0000
commite251337a4d605e22715ed28b0a168b7fe18c4c9f (patch)
treec91311cd9e898620dcc8ca60b386c7d4643f3505
parent6b06cb80be64fcf207bee734cc678c25434ed1a4 (diff)
downloadbusybox-w32-e251337a4d605e22715ed28b0a168b7fe18c4c9f.tar.gz
busybox-w32-e251337a4d605e22715ed28b0a168b7fe18c4c9f.tar.bz2
busybox-w32-e251337a4d605e22715ed28b0a168b7fe18c4c9f.zip
Add more -W options to gcc.
-rw-r--r--Makefile.flags17
1 files changed, 3 insertions, 14 deletions
diff --git a/Makefile.flags b/Makefile.flags
index f27c601c8..3889df09b 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -21,27 +21,16 @@ CPPFLAGS += \
21CFLAGS += $(call cc-option,-Wall -Wshadow -Wwrite-strings,) 21CFLAGS += $(call cc-option,-Wall -Wshadow -Wwrite-strings,)
22CFLAGS += $(call cc-option,-Wundef -Wstrict-prototypes,) 22CFLAGS += $(call cc-option,-Wundef -Wstrict-prototypes,)
23CFLAGS += $(call cc-option,-Wunused -Wunused-parameter,) 23CFLAGS += $(call cc-option,-Wunused -Wunused-parameter,)
24# If you want to add "-Wmissing-prototypes -Wmissing-declarations" above 24CFLAGS += $(call cc-option,-Wmissing-prototypes -Wmissing-declarations,)
25# (or anything else for that matter) make sure that it is still possible 25# If you want to add more -Wsomething above, make sure that it is
26# to build bbox without warnings. Current offender: find.c:alloc_action(). 26# still possible to build bbox without warnings.
27# Looks more like gcc bug: gcc will warn on it with or without prototype.
28# But still, warning-free compile is a must, or else we will drown
29# in warnings pretty soon.
30 27
31ifeq ($(CONFIG_WERROR),y) 28ifeq ($(CONFIG_WERROR),y)
32CFLAGS += $(call cc-option,-Werror,) 29CFLAGS += $(call cc-option,-Werror,)
33else
34# for development, warn a little bit about unused results..
35CPPFLAGS += -D_FORTIFY_SOURCE=2
36endif 30endif
37# gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action() 31# gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action()
38CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition) 32CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition)
39 33
40# gcc emits bogus "no prev proto" warning on find.c:alloc_action()
41ifneq ($(CONFIG_WERROR),y)
42CFLAGS += $(call cc-option,-Wmissing-prototypes -Wmissing-declarations,)
43endif
44
45CFLAGS += $(call cc-option,-Os -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,) 34CFLAGS += $(call cc-option,-Os -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,)
46# -fno-guess-branch-probability: prohibit pseudo-random guessing 35# -fno-guess-branch-probability: prohibit pseudo-random guessing
47# of branch probabilities (hopefully makes bloatcheck more stable): 36# of branch probabilities (hopefully makes bloatcheck more stable):