Use -ffunction-sections -fdata-sections --gc-sections if the compiler supports

it.  If nothing else, this gives us better granularity in bloatcheck.
This commit is contained in:
Rob Landley 2006-06-13 16:17:16 +00:00
parent c4b673994e
commit 7900b7b9b9

View File

@ -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 # gcc-4.1 and beyond
endif endif
OPTIMIZATION+=$(call check_cc,$(CC),-fomit-frame-pointer,) 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 else
CFLAGS +=-DNDEBUG CFLAGS +=-DNDEBUG
CHECKED_LDFLAGS += $(call check_ld,$(LD),--sort-common,) CHECKED_LDFLAGS += $(call check_ld,$(LD),--sort-common,)
CHECKED_LDFLAGS += $(call check_ld,--gc-sections,)
endif endif
ifneq ($(strip $(CONFIG_DEBUG_PESSIMIZE)),y) ifneq ($(strip $(CONFIG_DEBUG_PESSIMIZE)),y)