aboutsummaryrefslogtreecommitdiff
path: root/Makefile.flags
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-23 11:39:13 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-23 11:39:13 +0000
commit82f8788acc1705a735cfa752b3f37b0de32ba390 (patch)
treecbccd3103dc783dfd56e9f4c562aec445d650ab6 /Makefile.flags
parentb5bb40f088e8618fa108753099f24f43b17fea21 (diff)
downloadbusybox-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.flags21
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
9CPPFLAGS += $(call cc-option,-std=gnu99,)
9CPPFLAGS += \ 10CPPFLAGS += \
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
18CFLAGS += \ 18# flag checks are grouped together to speed the checks up a bit..
19 -Wall -Wshadow -Wno-error -Wundef \ 19CFLAGS += $(call cc-option,-Wall -Wshadow,)
20 -Wold-style-definition \ 20CFLAGS += $(call cc-option,-Wundef -Wold-style-definition -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,)
21 -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \ 21CFLAGS += $(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 \ 22CFLAGS += $(call cc-option,-static-libgcc -funsigned-char,)
23 -Os -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ 23CFLAGS += $(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
30ifeq ($(CONFIG_DEBUG),y) 29ifeq ($(CONFIG_DEBUG),y)
31CFLAGS += -g 30CFLAGS += $(call cc-option,-g)
32endif 31endif
33 32
34ifeq ($(CONFIG_STATIC),y) 33ifeq ($(CONFIG_STATIC),y)