summaryrefslogtreecommitdiff
path: root/scripts/Makefile.spl
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-07-04 11:57:44 -0600
committerSimon Glass <sjg@chromium.org>2016-07-14 20:40:24 -0600
commit72a7e0760447ed46ca50174cb8798a2e84dedf85 (patch)
tree6536453aec42ef1f10151123193559fb63300c93 /scripts/Makefile.spl
parent12c550d4fbfae272793c222c51af77613ffc5963 (diff)
downloadu-boot-imx-72a7e0760447ed46ca50174cb8798a2e84dedf85.zip
u-boot-imx-72a7e0760447ed46ca50174cb8798a2e84dedf85.tar.gz
u-boot-imx-72a7e0760447ed46ca50174cb8798a2e84dedf85.tar.bz2
Makefile: Allow the SPL final link rule to be overridden
Overriding the final link rule is possible with U-Boot proper. It us used to create a sandbox image links with host libraries. To build a sandbox SPL image we need the same feature for SPL. To support this, update the SPL link rule so sandbox can override it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts/Makefile.spl')
-rw-r--r--scripts/Makefile.spl6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 0997fd9..2b5c995 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -241,8 +241,10 @@ cmd_mksunxiboot = $(objtree)/tools/mksunxiboot $< $@
$(obj)/sunxi-spl.bin: $(obj)/$(SPL_BIN).bin FORCE
$(call if_changed,mksunxiboot)
-quiet_cmd_u-boot-spl = LD $@
- cmd_u-boot-spl = (cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \
+# Rule to link u-boot-spl
+# May be overridden by arch/$(ARCH)/config.mk
+quiet_cmd_u-boot-spl ?= LD $@
+ cmd_u-boot-spl ?= (cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \
$(patsubst $(obj)/%,%,$(u-boot-spl-init)) --start-group \
$(patsubst $(obj)/%,%,$(u-boot-spl-main)) --end-group \
$(PLATFORM_LIBS) -Map $(SPL_BIN).map -o $(SPL_BIN))