summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley2006-06-13 16:17:16 +0000
committerRob Landley2006-06-13 16:17:16 +0000
commit7900b7b9b9956661d536223226c462c7f48fa40a (patch)
tree7569d3c75c4c3b3909dc478ab29ed1a2bba8d9af
parentc4b673994e5e6f358b80fa3eef89e1cc26f60cee (diff)
downloadbusybox-7900b7b9b9956661d536223226c462c7f48fa40a.zip
busybox-7900b7b9b9956661d536223226c462c7f48fa40a.tar.gz
Use -ffunction-sections -fdata-sections --gc-sections if the compiler supports
it. If nothing else, this gives us better granularity in bloatcheck.
-rw-r--r--Rules.mak2
1 files changed, 2 insertions, 0 deletions
diff --git a/Rules.mak b/Rules.mak
index 550fe19..2f34bfb 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -253,6 +253,7 @@ ifeq ($(strip $(shell [ $(CC_MAJOR) -ge 4 -a $(CC_MINOR) -ge 1 ] ; echo $$?)),0)
endif # gcc-4.1 and beyond
endif
OPTIMIZATION+=$(call check_cc,$(CC),-fomit-frame-pointer,)
+OPTIMIZATION+=$(call check_cc,$(CC),-ffunction-sections -fdata-sections,)
#
#--------------------------------------------------------
@@ -284,6 +285,7 @@ ifeq ($(strip $(CONFIG_DEBUG)),y)
else
CFLAGS +=-DNDEBUG
CHECKED_LDFLAGS += $(call check_ld,$(LD),--sort-common,)
+ CHECKED_LDFLAGS += $(call check_ld,--gc-sections,)
endif
ifneq ($(strip $(CONFIG_DEBUG_PESSIMIZE)),y)