[U-Boot] [PATCH v2 4/7] Define CPUDIR for the .lds link script
Simon Glass
sjg at chromium.org
Mon Nov 21 21:49:40 CET 2011
Most link scripts differ only in the directory containing the start.o
file. Make this a #define to remove this last difference.
(Note that if start.o were disallowed outside the CPU start directory then
we wouldn't even need this. But that is a separate discussion.)
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2:
- Make this change in spl/Makefile also
Makefile | 1 +
spl/Makefile | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 423adef..3cb00ed 100644
--- a/Makefile
+++ b/Makefile
@@ -332,6 +332,7 @@ export PLATFORM_LIBS
# on the fly.
LDPPFLAGS += \
-include $(TOPDIR)/include/u-boot/u-boot.lds.h \
+ -DCPUDIR=$(CPUDIR) \
$(shell $(LD) --version | \
sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
diff --git a/spl/Makefile b/spl/Makefile
index 82484d4..232822b 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -99,6 +99,7 @@ endif
LDPPFLAGS += \
-include $(TOPDIR)/include/u-boot/u-boot.lds.h \
-include $(OBJTREE)/include/config.h \
+ -DCPUDIR=$(CPUDIR) \
$(shell $(LD) --version | \
sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
--
1.7.3.1
More information about the U-Boot
mailing list