diff options
-rw-r--r-- | Makefile.flags | 21 | ||||
-rw-r--r-- | arch/i386/Makefile | 2 |
2 files changed, 11 insertions, 12 deletions
diff --git a/Makefile.flags b/Makefile.flags index 669e30cfc..8f6d0c9bd 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
@@ -6,8 +6,8 @@ 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 | 8 | ||
9 | CPPFLAGS += $(call cc-option,-std=gnu99,) | ||
9 | CPPFLAGS += \ | 10 | CPPFLAGS += \ |
10 | -std=gnu99 \ | ||
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 \ |
13 | -include include/autoconf.h \ | 13 | -include include/autoconf.h \ |
@@ -15,20 +15,19 @@ CPPFLAGS += \ | |||
15 | $(if $(CONFIG_LFS),-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) \ | 15 | $(if $(CONFIG_LFS),-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) \ |
16 | -D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP | 16 | -D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP |
17 | 17 | ||
18 | CFLAGS += \ | 18 | # flag checks are grouped together to speed the checks up a bit.. |
19 | -Wall -Wshadow -Wno-error -Wundef \ | 19 | CFLAGS += $(call cc-option,-Wall -Wshadow,) |
20 | -Wold-style-definition \ | 20 | CFLAGS += $(call cc-option,-Wundef -Wold-style-definition -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,) |
21 | -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \ | 21 | CFLAGS += $(call cc-option,-Os -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections,) |
22 | -funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc \ | 22 | CFLAGS += $(call cc-option,-static-libgcc -funsigned-char,) |
23 | -Os -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ | 23 | CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-loops=1,) |
24 | -fomit-frame-pointer -ffunction-sections -fdata-sections | 24 | |
25 | # FIXME: These warnings are at least partially to be concerned about and should | 25 | # FIXME: These warnings are at least partially to be concerned about and should |
26 | # be fixed.. | 26 | # be fixed.. |
27 | #CFLAGS+=-Wconversion | 27 | #CFLAGS+=$(call cc-option,-Wconversion,) |
28 | |||
29 | 28 | ||
30 | ifeq ($(CONFIG_DEBUG),y) | 29 | ifeq ($(CONFIG_DEBUG),y) |
31 | CFLAGS += -g | 30 | CFLAGS += $(call cc-option,-g) |
32 | endif | 31 | endif |
33 | 32 | ||
34 | ifeq ($(CONFIG_STATIC),y) | 33 | ifeq ($(CONFIG_STATIC),y) |
diff --git a/arch/i386/Makefile b/arch/i386/Makefile index 595868ec5..385dd52be 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile | |||
@@ -2,4 +2,4 @@ | |||
2 | # Build system | 2 | # Build system |
3 | # ========================================================================== | 3 | # ========================================================================== |
4 | 4 | ||
5 | CFLAGS += -march=i386 -mpreferred-stack-boundary=2 | 5 | CFLAGS += $(call cc-option,-march=i386 -mpreferred-stack-boundary=2,) |