From: Simon Glass <sjg@chromium.org>
Date: Mon, 21 Nov 2011 10:49:40 +0000 (+0000)
Subject: Define CPUDIR for the .lds link script
X-Git-Tag: v2025.01-rc5-pxa1908~17674^2~208^2~3
X-Git-Url: http://git.dujemihanovic.xyz/repo?a=commitdiff_plain;h=7e6403a66d9a9c939ee8146436d7d652673b2995;p=u-boot.git

Define CPUDIR for the .lds link script

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@chromium.org>
---

diff --git a/Makefile b/Makefile
index e2a5a84b20..8204312f03 100644
--- a/Makefile
+++ b/Makefile
@@ -344,6 +344,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 680f6dd1f6..ea7d4750fb 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -93,6 +93,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')