]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/sh/config.mk
Make STANDALONE_LOAD_ADDR configurable per board
[people/ms/u-boot.git] / arch / sh / config.mk
index 07ba68f19879b1db2c791f02b16d565a80ef112a..af57307574f3c260612a62fda351d21f7e037748 100644 (file)
 
 CROSS_COMPILE ?= sh4-linux-
 
-STANDALONE_LOAD_ADDR = 0x8C000000
+CONFIG_STANDALONE_LOAD_ADDR ?= 0x8C000000
 ifeq ($(CPU),sh2)
-STANDALONE_LOAD_ADDR += -EB
+CONFIG_STANDALONE_LOAD_ADDR += -EB
 endif
 
 PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
-PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(TEXT_BASE)
+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