]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/sh/config.mk
Introduce a new linker flag LDFLAGS_FINAL
[people/ms/u-boot.git] / arch / sh / config.mk
index 415c94979848f6980e6457200b46f05baf271308..48393b5eca1131273f0c2cbc0a4d7c83f7dce154 100644 (file)
@@ -30,5 +30,11 @@ endif
 
 PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
 PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(CONFIG_SYS_TEXT_BASE)
+LDFLAGS_FINAL = --gc-sections
 
+ifdef CONFIG_SYS_LDSCRIPT
+LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
+else
 LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
+endif
+