summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-07-26 11:29:20 -0400
committerTom Rini <trini@konsulko.com>2017-07-26 11:29:20 -0400
commit0ddc9c172279f686077310fbcfa5baf10c719188 (patch)
treeb577c229572fc411172a15b724303d1c91d9a5a4 /Makefile
parentdc5210a20d7143f8adb3c4341e44d797357708bf (diff)
parente94136bd87b18345e38a5e44445a476de12b4354 (diff)
downloadu-boot-0ddc9c172279f686077310fbcfa5baf10c719188.tar.gz
u-boot-0ddc9c172279f686077310fbcfa5baf10c719188.tar.xz
u-boot-0ddc9c172279f686077310fbcfa5baf10c719188.zip
Merge git://git.denx.de/u-boot-mips
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a1a3aeac52..3d2b66a91f 100644
--- a/Makefile
+++ b/Makefile
@@ -1232,13 +1232,16 @@ u-boot.elf: u-boot.bin
$(Q)$(OBJCOPY) -I binary $(PLATFORM_ELFFLAGS) $< u-boot-elf.o
$(call if_changed,u-boot-elf)
+ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(ARCH)/Makefile.postlink)
+
# Rule to link u-boot
# May be overridden by arch/$(ARCH)/config.mk
quiet_cmd_u-boot__ ?= LD $@
cmd_u-boot__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_u-boot) -o $@ \
-T u-boot.lds $(u-boot-init) \
--start-group $(u-boot-main) --end-group \
- $(PLATFORM_LIBS) -Map u-boot.map
+ $(PLATFORM_LIBS) -Map u-boot.map; \
+ $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
quiet_cmd_smap = GEN common/system_map.o
cmd_smap = \
@@ -1248,7 +1251,7 @@ cmd_smap = \
-c $(srctree)/common/system_map.c -o common/system_map.o
u-boot: $(u-boot-init) $(u-boot-main) u-boot.lds FORCE
- $(call if_changed,u-boot__)
+ +$(call if_changed,u-boot__)
ifeq ($(CONFIG_KALLSYMS),y)
$(call cmd,smap)
$(call cmd,u-boot__) common/system_map.o