diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-01-23 11:39:13 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-01-23 11:39:13 +0000 |
commit | 82f8788acc1705a735cfa752b3f37b0de32ba390 (patch) | |
tree | cbccd3103dc783dfd56e9f4c562aec445d650ab6 /Makefile.flags | |
parent | b5bb40f088e8618fa108753099f24f43b17fea21 (diff) | |
download | busybox-w32-82f8788acc1705a735cfa752b3f37b0de32ba390.tar.gz busybox-w32-82f8788acc1705a735cfa752b3f37b0de32ba390.tar.bz2 busybox-w32-82f8788acc1705a735cfa752b3f37b0de32ba390.zip |
- call cc-option to check if the compiler supports the flags we asked to use
Diffstat (limited to 'Makefile.flags')
-rw-r--r-- | Makefile.flags | 21 |
1 files changed, 10 insertions, 11 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) |