diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-01-27 14:03:15 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-01-27 14:03:15 +0000 |
commit | 149aa325fe2335c9a7c583a097ce81d3ecccc609 (patch) | |
tree | 93eb2eb7a1fa431c0bbe744460bedb9739c90389 | |
parent | 2a8bd2960a01c285b6aa0ba1870c1baaf79233b6 (diff) | |
download | busybox-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.flags | 18 |
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 @@ | |||
5 | BB_VER = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 5 | BB_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 | |||
9 | CPPFLAGS += $(call cc-option,-std=gnu99,) | 8 | CPPFLAGS += $(call cc-option,-std=gnu99,) |
9 | |||
10 | CPPFLAGS += \ | 10 | CPPFLAGS += \ |
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,) | |||
20 | ifeq ($(CONFIG_WERROR),y) | 20 | ifeq ($(CONFIG_WERROR),y) |
21 | CFLAGS += $(call cc-option,-Werror,) | 21 | CFLAGS += $(call cc-option,-Werror,) |
22 | endif | 22 | endif |
23 | CFLAGS += $(call cc-option,-Wundef -Wold-style-definition -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,) | 23 | CFLAGS += $(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. | ||
30 | ifneq ($(CONFIG_WERROR),y) | ||
31 | CFLAGS += $(call cc-option,-Wmissing-prototypes -Wmissing-declarations,) | ||
32 | endif | ||
24 | CFLAGS += $(call cc-option,-Os -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,) | 33 | CFLAGS += $(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): |
27 | CFLAGS += $(call cc-option,-funsigned-char -fno-guess-branch-probability -static-libgcc,) | 36 | CFLAGS += $(call cc-option,-fno-guess-branch-probability,) |
37 | CFLAGS += $(call cc-option,-funsigned-char -static-libgcc,) | ||
28 | CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,) | 38 | CFLAGS += $(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 |