aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-23 11:39:13 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-23 11:39:13 +0000
commitf029b49cc173b30f43ea048eadba362b35d1c5f4 (patch)
treecbccd3103dc783dfd56e9f4c562aec445d650ab6
parent2bb1a7ef3f06696c1d8a644a58791cf2ea7e03e1 (diff)
downloadbusybox-w32-f029b49cc173b30f43ea048eadba362b35d1c5f4.tar.gz
busybox-w32-f029b49cc173b30f43ea048eadba362b35d1c5f4.tar.bz2
busybox-w32-f029b49cc173b30f43ea048eadba362b35d1c5f4.zip
- call cc-option to check if the compiler supports the flags we asked to use
git-svn-id: svn://busybox.net/trunk/busybox@17486 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--Makefile.flags21
-rw-r--r--arch/i386/Makefile2
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
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)
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
5CFLAGS += -march=i386 -mpreferred-stack-boundary=2 5CFLAGS += $(call cc-option,-march=i386 -mpreferred-stack-boundary=2,)