Commit 4a377552f01b7b19ea5fc02eb844c786751f7247
Committed by
Tom Rini
1 parent
331b45fb70
Exists in
master
and in
49 other branches
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>
Showing 6 changed files with 10 additions and 9 deletions Side-by-side Diff
Makefile
... | ... | @@ -495,7 +495,7 @@ |
495 | 495 | #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug |
496 | 496 | ifdef CONFIG_SYS_LDSCRIPT |
497 | 497 | # need to strip off double quotes |
498 | - LDSCRIPT := $(CONFIG_SYS_LDSCRIPT:"%"=%) | |
498 | + LDSCRIPT := $(srctree)/$(CONFIG_SYS_LDSCRIPT:"%"=%) | |
499 | 499 | endif |
500 | 500 | endif |
501 | 501 | |
... | ... | @@ -518,9 +518,6 @@ |
518 | 518 | # We don't expect a Makefile here |
519 | 519 | LDSCRIPT_MAKEFILE_DIR = |
520 | 520 | endif |
521 | - ifeq ($(wildcard $(LDSCRIPT)),) | |
522 | -$(error could not find linker script) | |
523 | - endif | |
524 | 521 | endif |
525 | 522 | |
526 | 523 | else |
... | ... | @@ -995,6 +992,10 @@ |
995 | 992 | @echo >&2 " Please undefine CONFIG_SYS_GENERIC_BOARD in your board config file." |
996 | 993 | @/bin/false |
997 | 994 | endif |
995 | +endif | |
996 | +ifeq ($(wildcard $(LDSCRIPT)),) | |
997 | + @echo >&2 " Could not find linker script." | |
998 | + @/bin/false | |
998 | 999 | endif |
999 | 1000 | |
1000 | 1001 | archprepare: prepare1 scripts_basic |
include/configs/MPC8536DS.h
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | #define CONFIG_SYS_TEXT_BASE_SPL 0xfff00000 |
25 | 25 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE_SPL /* start of monitor */ |
26 | 26 | #else |
27 | -#define CONFIG_SYS_LDSCRIPT $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds | |
27 | +#define CONFIG_SYS_LDSCRIPT $(CPUDIR)/u-boot-nand.lds | |
28 | 28 | #define CONFIG_SYS_TEXT_BASE 0xf8f82000 |
29 | 29 | #endif /* CONFIG_NAND_SPL */ |
30 | 30 | #endif |
include/configs/MPC8569MDS.h
... | ... | @@ -56,7 +56,7 @@ |
56 | 56 | #define CONFIG_SYS_TEXT_BASE_SPL 0xfff00000 |
57 | 57 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE_SPL /* start of monitor */ |
58 | 58 | #else |
59 | -#define CONFIG_SYS_LDSCRIPT $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds | |
59 | +#define CONFIG_SYS_LDSCRIPT $(CPUDIR)/u-boot-nand.lds | |
60 | 60 | #define CONFIG_SYS_TEXT_BASE 0xf8f82000 |
61 | 61 | #endif |
62 | 62 | #endif |
include/configs/MPC8572DS.h
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | #define CONFIG_SYS_TEXT_BASE_SPL 0xfff00000 |
25 | 25 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE_SPL /* start of monitor */ |
26 | 26 | #else |
27 | -#define CONFIG_SYS_LDSCRIPT $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds | |
27 | +#define CONFIG_SYS_LDSCRIPT $(CPUDIR)/u-boot-nand.lds | |
28 | 28 | #define CONFIG_SYS_TEXT_BASE 0xf8f82000 |
29 | 29 | #endif /* CONFIG_NAND_SPL */ |
30 | 30 | #endif |
include/configs/P1023RDS.h
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | #ifdef CONFIG_NAND_SPL |
27 | 27 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE_SPL /* start of monitor */ |
28 | 28 | #else |
29 | -#define CONFIG_SYS_LDSCRIPT $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds | |
29 | +#define CONFIG_SYS_LDSCRIPT $(CPUDIR)/u-boot-nand.lds | |
30 | 30 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ |
31 | 31 | #endif /* CONFIG_NAND_SPL */ |
32 | 32 | #endif |
include/configs/P1_P2_RDB.h
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 | #define CONFIG_SYS_TEXT_BASE_SPL 0xfff00000 |
39 | 39 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE_SPL /* start of monitor */ |
40 | 40 | #else |
41 | -#define CONFIG_SYS_LDSCRIPT $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds | |
41 | +#define CONFIG_SYS_LDSCRIPT $(CPUDIR)/u-boot-nand.lds | |
42 | 42 | #define CONFIG_SYS_TEXT_BASE 0xf8f82000 |
43 | 43 | #endif /* CONFIG_NAND_SPL */ |
44 | 44 | #endif |