summaryrefslogtreecommitdiff
path: root/config.mk
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 /config.mk
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 'config.mk')
-rw-r--r--config.mk8
1 files changed, 5 insertions, 3 deletions
diff --git a/config.mk b/config.mk
index 66f8fe67f73..5147c3568b8 100644
--- a/config.mk
+++ b/config.mk
@@ -204,9 +204,11 @@ endif
AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
-LDFLAGS += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
+LDFLAGS += $(PLATFORM_LDFLAGS)
+
+LDFLAGS_u-boot += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
ifneq ($(CONFIG_SYS_TEXT_BASE),)
-LDFLAGS += -Ttext $(CONFIG_SYS_TEXT_BASE)
+LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
endif
# Location of a usable BFD library, where we define "usable" as
@@ -259,7 +261,7 @@ $(obj)%.s: %.c
# If the list of objects to link is empty, just create an empty built-in.o
cmd_link_o_target = $(if $(strip $1),\
- $(LD) -r -o $@ $1 ,\
+ $(LD) $(LDFLAGS) -r -o $@ $1,\
rm -f $@; $(AR) rcs $@ )
#########################################################################