summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHaiying Wang <Haiying.Wang@freescale.com>2011-02-22 16:38:05 -0500
committerWolfgang Denk <wd@denx.de>2011-03-22 23:32:06 +0100
commit6dc1eceb9c5f42216f1ba0e0ef538015b0aa10bc (patch)
tree68b8f0f3a430eefbdef343dd62d8c89eebcadb98 /arch
parentc81c1222427f268d29ba999c82e2477c428e7bab (diff)
downloadblackbird-obmc-uboot-6dc1eceb9c5f42216f1ba0e0ef538015b0aa10bc.tar.gz
blackbird-obmc-uboot-6dc1eceb9c5f42216f1ba0e0ef538015b0aa10bc.zip
Introduce a new linker flag LDFLAGS_FINAL
commit 8aba9dceebb14144e07d19593111ee3a999c37fc Divides variable of linker flags to LDFLAGS-u-boot and LDFLAGS breaks the usage of --gc-section to build nand_spl. We still need linker option --gc-section for every uboot image, not only the main one. LDFLAGS_FINAL passes the --gc-sections to each uboot image. To get the proper linker flags, we use LDFLAGS and LDFLAGS_FINAL to replace PLATFORM_LDFLAGS in the Makefile of each nand_spl board. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/config.mk2
-rw-r--r--arch/i386/config.mk2
-rw-r--r--arch/nios2/config.mk2
-rw-r--r--arch/powerpc/config.mk2
-rw-r--r--arch/sh/config.mk2
5 files changed, 5 insertions, 5 deletions
diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index 0cba294e73..f4503eacb9 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -30,7 +30,7 @@ CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE)))
PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic
PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN
-LDFLAGS_u-boot += --gc-sections
+LDFLAGS_FINAL += --gc-sections
LDFLAGS += -m elf32bfin
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
diff --git a/arch/i386/config.mk b/arch/i386/config.mk
index a84af63210..67aac0daa5 100644
--- a/arch/i386/config.mk
+++ b/arch/i386/config.mk
@@ -38,6 +38,6 @@ PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions
-LDFLAGS_u-boot += --gc-sections -pie
+LDFLAGS_FINAL += --gc-sections -pie
LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
index fa93180f30..d241a96e8e 100644
--- a/arch/nios2/config.mk
+++ b/arch/nios2/config.mk
@@ -31,5 +31,5 @@ PLATFORM_CPPFLAGS += -G0
LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds
-LDFLAGS_u-boot += --gc-sections
+LDFLAGS_FINAL += --gc-sections
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index 64191c78f1..31e44160f6 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -24,7 +24,7 @@
CROSS_COMPILE ?= ppc_8xx-
STANDALONE_LOAD_ADDR = 0x40000
-LDFLAGS_u-boot = --gc-sections
+LDFLAGS_FINAL += --gc-sections
PLATFORM_RELFLAGS += -mrelocatable -ffunction-sections -fdata-sections
PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
PLATFORM_LDFLAGS += -n
diff --git a/arch/sh/config.mk b/arch/sh/config.mk
index 433cc15389..48393b5eca 100644
--- a/arch/sh/config.mk
+++ b/arch/sh/config.mk
@@ -30,7 +30,7 @@ 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
+LDFLAGS_FINAL = --gc-sections
ifdef CONFIG_SYS_LDSCRIPT
LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
OpenPOWER on IntegriCloud