diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-10-24 01:30:44 +0900 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-10-23 13:19:11 -0400 |
commit | 9adb6d2407d10d30a138a94b200fa0aaff4d73dc (patch) | |
tree | e81be93c7b4e2583b37eb0b2866035a1f132e765 | |
parent | 45ccec8f29563f248cd1a7d53c1a9ffa2881837d (diff) | |
download | u-boot-imx-9adb6d2407d10d30a138a94b200fa0aaff4d73dc.zip u-boot-imx-9adb6d2407d10d30a138a94b200fa0aaff4d73dc.tar.gz u-boot-imx-9adb6d2407d10d30a138a94b200fa0aaff4d73dc.tar.bz2 |
kbuild: fix a bug of the u-boot-spl link rule
cmd_u-boot-spl includes $(PLATFORM_LIBS) which changes
when CONFIG_USE_PRIVATE_GCC is updated. The u-boot-spl image
should be re-linked if any prerequisite is newer than it
or the command line has changed.
$(call, if_changed,...) should be used instead of $(call cmd,...).
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
-rw-r--r-- | scripts/Makefile.spl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 88c01d1..7afe437 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -216,13 +216,13 @@ $(obj)/sunxi-spl.bin: $(obj)/$(SPL_BIN).bin endif quiet_cmd_u-boot-spl = LD $@ - cmd_u-boot-spl = cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ + 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) + $(PLATFORM_LIBS) -Map $(SPL_BIN).map -o $(SPL_BIN)) -$(obj)/$(SPL_BIN): $(u-boot-spl-init) $(u-boot-spl-main) $(obj)/u-boot-spl.lds - $(call cmd,u-boot-spl) +$(obj)/$(SPL_BIN): $(u-boot-spl-init) $(u-boot-spl-main) $(obj)/u-boot-spl.lds FORCE + $(call if_changed,u-boot-spl) $(sort $(u-boot-spl-init) $(u-boot-spl-main)): $(u-boot-spl-dirs) ; |