aboutsummaryrefslogtreecommitdiff
path: root/arch/sh
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <iwamatsu@nigauri.org>2011-01-06 10:23:54 +0900
committerWolfgang Denk <wd@denx.de>2011-01-25 22:22:30 +0100
commit8aba9dceebb14144e07d19593111ee3a999c37fc (patch)
treeb6d60913bf0b5549f1cbc67aa4d7701bd0878ee0 /arch/sh
parentf8ea15f769773943050fa3ba444a5514066441d4 (diff)
Divides variable of linker flags to LDFLAGS-u-boot and LDFLAGS
Linker needs to use the proper endian/bfd flags even when doing partial linking. LDFLAGS_u-boot sets linker option which is called it when U-boot is built (u-boot final). LDFLAGS sets necessary option by partial linking (use in cmd_link_o_target). CC: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/config.mk2
-rw-r--r--arch/sh/cpu/sh2/config.mk4
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/sh/config.mk b/arch/sh/config.mk
index 415c94979..4ef85e3e5 100644
--- a/arch/sh/config.mk
+++ b/arch/sh/config.mk
@@ -30,5 +30,5 @@ endif
PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(CONFIG_SYS_TEXT_BASE)
-
+LDFLAGS_u-boot = --gc-sections
LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
diff --git a/arch/sh/cpu/sh2/config.mk b/arch/sh/cpu/sh2/config.mk
index 52d5a0f4d..f2d40aa22 100644
--- a/arch/sh/cpu/sh2/config.mk
+++ b/arch/sh/cpu/sh2/config.mk
@@ -21,6 +21,8 @@
# MA 02111-1307 USA
#
#
+ENDIANNESS += -EB
+
PLATFORM_CPPFLAGS += -m3e -mb
PLATFORM_RELFLAGS += -ffixed-r13
-PLATFORM_LDFLAGS += -EB
+PLATFORM_LDFLAGS += $(ENDIANNESS)