diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-02-25 19:26:48 +0900 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-02-25 11:01:29 -0500 |
commit | 4a377552f01b7b19ea5fc02eb844c786751f7247 (patch) | |
tree | 8a2f59f47d98e3f02019164e3a545efc2a39a208 /Makefile | |
parent | 331b45fb70e6c2355a28f1a11d63075a873bb1d5 (diff) | |
download | u-boot-imx-4a377552f01b7b19ea5fc02eb844c786751f7247.zip u-boot-imx-4a377552f01b7b19ea5fc02eb844c786751f7247.tar.gz u-boot-imx-4a377552f01b7b19ea5fc02eb844c786751f7247.tar.bz2 |
kbuild: Move linker sciript check to prepare1
Same as the previous commit.
Move sanity check to prepare1 target to avoid nasty troubles.
Before this commit, LDSCRIPT existence was not checked
when it was specified by CONFIG_SYS_LDSCRIPT.
Now LDSCRIPT existence is checked for all boards.
$(wildcard $(LDSCRIPT)) must point to the linker scripts
with absolute path.
Otherwise, make will terminate with a false error
on out-of-tree build.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -495,7 +495,7 @@ ifndef LDSCRIPT #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug ifdef CONFIG_SYS_LDSCRIPT # need to strip off double quotes - LDSCRIPT := $(CONFIG_SYS_LDSCRIPT:"%"=%) + LDSCRIPT := $(srctree)/$(CONFIG_SYS_LDSCRIPT:"%"=%) endif endif @@ -518,9 +518,6 @@ ifndef LDSCRIPT # We don't expect a Makefile here LDSCRIPT_MAKEFILE_DIR = endif - ifeq ($(wildcard $(LDSCRIPT)),) -$(error could not find linker script) - endif endif else @@ -996,6 +993,10 @@ ifeq ($(CONFIG_SYS_GENERIC_BOARD),y) @/bin/false endif endif +ifeq ($(wildcard $(LDSCRIPT)),) + @echo >&2 " Could not find linker script." + @/bin/false +endif archprepare: prepare1 scripts_basic |