aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-27 14:03:15 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-27 14:03:15 +0000
commit149aa325fe2335c9a7c583a097ce81d3ecccc609 (patch)
tree93eb2eb7a1fa431c0bbe744460bedb9739c90389
parent2a8bd2960a01c285b6aa0ba1870c1baaf79233b6 (diff)
downloadbusybox-w32-149aa325fe2335c9a7c583a097ce81d3ecccc609.tar.gz
busybox-w32-149aa325fe2335c9a7c583a097ce81d3ecccc609.tar.bz2
busybox-w32-149aa325fe2335c9a7c583a097ce81d3ecccc609.zip
make it possible to build bbox without warnings again.
git-svn-id: svn://busybox.net/trunk/busybox@17553 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--Makefile.flags18
1 files changed, 14 insertions, 4 deletions
diff --git a/Makefile.flags b/Makefile.flags
index cec73df8f..b39dfbb3c 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -5,8 +5,8 @@
5BB_VER = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) 5BB_VER = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
6 6
7# -std=gnu99 needed for [U]LLONG_MAX on some systems 7# -std=gnu99 needed for [U]LLONG_MAX on some systems
8
9CPPFLAGS += $(call cc-option,-std=gnu99,) 8CPPFLAGS += $(call cc-option,-std=gnu99,)
9
10CPPFLAGS += \ 10CPPFLAGS += \
11 -Iinclude -Ilibbb \ 11 -Iinclude -Ilibbb \
12 $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) -I$(srctree)/libbb \ 12 $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) -I$(srctree)/libbb \
@@ -20,11 +20,21 @@ CFLAGS += $(call cc-option,-Wall -Wshadow,)
20ifeq ($(CONFIG_WERROR),y) 20ifeq ($(CONFIG_WERROR),y)
21CFLAGS += $(call cc-option,-Werror,) 21CFLAGS += $(call cc-option,-Werror,)
22endif 22endif
23CFLAGS += $(call cc-option,-Wundef -Wold-style-definition -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,) 23CFLAGS += $(call cc-option,-Wundef -Wold-style-definition -Wstrict-prototypes,)
24# If you want to add "-Wmissing-prototypes -Wmissing-declarations" above
25# (or anything else for that matter) make sure that it is still possible
26# to build bbox without warnings. Current offender: find.c:alloc_action().
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.
30ifneq ($(CONFIG_WERROR),y)
31CFLAGS += $(call cc-option,-Wmissing-prototypes -Wmissing-declarations,)
32endif
24CFLAGS += $(call cc-option,-Os -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,) 33CFLAGS += $(call cc-option,-Os -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,)
25# -fno-guess-branch-probability: prohibit pseudo-random guessing 34# -fno-guess-branch-probability: prohibit pseudo-random guessing
26# of branch probabilities (hopefully makes bloatcheck more stable) 35# of branch probabilities (hopefully makes bloatcheck more stable):
27CFLAGS += $(call cc-option,-funsigned-char -fno-guess-branch-probability -static-libgcc,) 36CFLAGS += $(call cc-option,-fno-guess-branch-probability,)
37CFLAGS += $(call cc-option,-funsigned-char -static-libgcc,)
28CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,) 38CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,)
29 39
30# FIXME: These warnings are at least partially to be concerned about and should 40# FIXME: These warnings are at least partially to be concerned about and should