diff options
author | Rob Landley <rob@landley.net> | 2006-06-13 16:17:16 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-06-13 16:17:16 +0000 |
commit | 7900b7b9b9956661d536223226c462c7f48fa40a (patch) | |
tree | 7569d3c75c4c3b3909dc478ab29ed1a2bba8d9af | |
parent | c4b673994e5e6f358b80fa3eef89e1cc26f60cee (diff) | |
download | busybox-w32-7900b7b9b9956661d536223226c462c7f48fa40a.tar.gz busybox-w32-7900b7b9b9956661d536223226c462c7f48fa40a.tar.bz2 busybox-w32-7900b7b9b9956661d536223226c462c7f48fa40a.zip |
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.mak | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -253,6 +253,7 @@ ifeq ($(strip $(shell [ $(CC_MAJOR) -ge 4 -a $(CC_MINOR) -ge 1 ] ; echo $$?)),0) | |||
253 | endif # gcc-4.1 and beyond | 253 | endif # gcc-4.1 and beyond |
254 | endif | 254 | endif |
255 | OPTIMIZATION+=$(call check_cc,$(CC),-fomit-frame-pointer,) | 255 | OPTIMIZATION+=$(call check_cc,$(CC),-fomit-frame-pointer,) |
256 | OPTIMIZATION+=$(call check_cc,$(CC),-ffunction-sections -fdata-sections,) | ||
256 | 257 | ||
257 | # | 258 | # |
258 | #-------------------------------------------------------- | 259 | #-------------------------------------------------------- |
@@ -284,6 +285,7 @@ ifeq ($(strip $(CONFIG_DEBUG)),y) | |||
284 | else | 285 | else |
285 | CFLAGS +=-DNDEBUG | 286 | CFLAGS +=-DNDEBUG |
286 | CHECKED_LDFLAGS += $(call check_ld,$(LD),--sort-common,) | 287 | CHECKED_LDFLAGS += $(call check_ld,$(LD),--sort-common,) |
288 | CHECKED_LDFLAGS += $(call check_ld,--gc-sections,) | ||
287 | endif | 289 | endif |
288 | 290 | ||
289 | ifneq ($(strip $(CONFIG_DEBUG_PESSIMIZE)),y) | 291 | ifneq ($(strip $(CONFIG_DEBUG_PESSIMIZE)),y) |