sidk_s5jt200: enable GC of unsed input sections
There are static fucntions not in use or referenced by others. In order
to reduce the size of .text, this commit changes the default build
option, specifying the linker to drop the unused input sections.
@@ -99,7 +99,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
-ARCHCFLAGS = -fno-builtin -mcpu=cortex-r4 -mfpu=vfpv3
+ARCHCFLAGS = -fno-builtin -mcpu=cortex-r4 -mfpu=vfpv3 -ffunction-sections -fdata-sections
ARCHCXXFLAGS = -fno-builtin -fexceptions -mcpu=cortex-r4 -mfpu=vfpv3
ifeq ($(QUICKBUILD),y)
ARCHWARNINGS = -Wall -Werror -Wstrict-prototypes -Wshadow -Wundef -Wno-implicit-function-declaration -Wno-unused-function -Wno-unused-but-set-variable
@@ -143,7 +143,7 @@ endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
LDFLAGS += -g
endif
-
+LDFLAGS += --gc-sections
HOSTCC = gcc
HOSTINCLUDES = -I.
