From 6e666cf28a4aeb6ece2ed7771e59cf41fce95fad Mon Sep 17 00:00:00 2001 From: Juan Manuel Cruz Date: Wed, 6 May 2015 10:30:41 -0500 Subject: [PATCH] Kbuild: Removes the SECTION_GARBAGE_COLLECTION ksymbol. This commit removes from the Kconfig system the SECTION_GARBAGE_COLLECTION kconfig symbols and sets the SECTION_GC_FLAG flag permanently on the compilation options. Change-Id: Iec070613d85afa697c62d6cbc54cc146cffcab27 Signed-off-by: Juan Manuel Cruz --- Kconfig | 25 ------------------------- scripts/Makefile.arm.preparch | 3 +-- scripts/Makefile.x86.preparch | 3 +-- 3 files changed, 2 insertions(+), 29 deletions(-) diff --git a/Kconfig b/Kconfig index a5a7e551516..f9b7bc73a20 100644 --- a/Kconfig +++ b/Kconfig @@ -94,31 +94,6 @@ config COMPILER_OPT A given LKM or USAP can override this setting by means of the OVERRIDE_COMPILER_OPT make variable in its Makefile. -config SECTION_GARBAGE_COLLECTION - bool - prompt "ELF section garbage collection" - default y - help - This option enables the compiler to place each function and data - item into its own ELF section, which then allows the linker to - discard any sections that are not directly referenced. Enabling - this option should significantly reduce the final image size, - especially in situations when only a relatively few number of - APIs in the object modules are actually referenced. - - Certain host tools expect the presence of various symbols in - the ELF image, regardless of image configuration or composition. - Enabling this option may cause these host tools to end abnormally - if the expected symbols have been discarded. - -config BUILD_TIMESTAMP - bool - prompt "Build timestamp" - default n - help - This option embeds a string into the project image that indicates - the date and time the image was created. - endmenu source "drivers/Kconfig" diff --git a/scripts/Makefile.arm.preparch b/scripts/Makefile.arm.preparch index 836814d23a6..212bdf87595 100644 --- a/scripts/Makefile.arm.preparch +++ b/scripts/Makefile.arm.preparch @@ -1,6 +1,5 @@ LTO_FLAG-y = $(call cc-option,-flto,) -SECTION_GC_FLAG-y = $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,) -SECTION_GC_FLAG = $(SECTION_GC_FLAG-$(CONFIG_SECTION_GARBAGE_COLLECTION)) +SECTION_GC_FLAG = $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,) arm_FLAGS = $(call cc-option,-mthumb,) ifeq ($(CONFIG_CPU_CORTEXM3),y) arm_FLAGS += -mcpu=cortex-m3 diff --git a/scripts/Makefile.x86.preparch b/scripts/Makefile.x86.preparch index 33a07b8aa97..7f4abca2279 100644 --- a/scripts/Makefile.x86.preparch +++ b/scripts/Makefile.x86.preparch @@ -1,11 +1,10 @@ PERF_OPT_FLAG-y = -DPERF_OPT ALIGN_STACK_FLAG- = -mpreferred-stack-boundary=2 -SECTION_GC_FLAG-y = $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,) +SECTION_GC_FLAG = $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,) LTO_FLAG-y = $(call cc-option,-flto,) PERF_OPT=$(if $(filter -Os,$(DEFAULTFLAGS)),,y) PERF_OPT_FLAG = $(PERF_OPT_FLAG-$(PERF_OPT)) ALIGN_STACK_FLAG = $(ALIGN_STACK_FLAG-$(PERF_OPT)) -SECTION_GC_FLAG = $(SECTION_GC_FLAG-$(CONFIG_SECTION_GARBAGE_COLLECTION)) LTO_FLAG = $(LTO_FLAG-$(CONFIG_LTO)) ifneq ($(CONFIG_BSP_QUARK),y) iSSE_FP_MATH_ ?= -mno-sse