diff options
author | Nobuhiro Iwamatsu | 2011-01-05 19:23:54 -0600 |
---|---|---|
committer | Wolfgang Denk | 2011-01-25 15:22:30 -0600 |
commit | 8aba9dceebb14144e07d19593111ee3a999c37fc (patch) | |
tree | b6d60913bf0b5549f1cbc67aa4d7701bd0878ee0 /config.mk | |
parent | f8ea15f769773943050fa3ba444a5514066441d4 (diff) | |
download | u-boot-8aba9dceebb14144e07d19593111ee3a999c37fc.tar.gz u-boot-8aba9dceebb14144e07d19593111ee3a999c37fc.tar.xz u-boot-8aba9dceebb14144e07d19593111ee3a999c37fc.zip |
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.mk | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -204,9 +204,11 @@ endif | |||
204 | 204 | ||
205 | AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS) | 205 | AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS) |
206 | 206 | ||
207 | LDFLAGS += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS) | 207 | LDFLAGS += $(PLATFORM_LDFLAGS) |
208 | |||
209 | LDFLAGS_u-boot += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS) | ||
208 | ifneq ($(CONFIG_SYS_TEXT_BASE),) | 210 | ifneq ($(CONFIG_SYS_TEXT_BASE),) |
209 | LDFLAGS += -Ttext $(CONFIG_SYS_TEXT_BASE) | 211 | LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) |
210 | endif | 212 | endif |
211 | 213 | ||
212 | # Location of a usable BFD library, where we define "usable" as | 214 | # Location of a usable BFD library, where we define "usable" as |
@@ -259,7 +261,7 @@ $(obj)%.s: %.c | |||
259 | 261 | ||
260 | # If the list of objects to link is empty, just create an empty built-in.o | 262 | # If the list of objects to link is empty, just create an empty built-in.o |
261 | cmd_link_o_target = $(if $(strip $1),\ | 263 | cmd_link_o_target = $(if $(strip $1),\ |
262 | $(LD) -r -o $@ $1 ,\ | 264 | $(LD) $(LDFLAGS) -r -o $@ $1,\ |
263 | rm -f $@; $(AR) rcs $@ ) | 265 | rm -f $@; $(AR) rcs $@ ) |
264 | 266 | ||
265 | ######################################################################### | 267 | ######################################################################### |