Define CPUDIR for the .lds link script
authorSimon Glass <sjg@chromium.org>
Mon, 21 Nov 2011 10:49:40 +0000 (10:49 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Fri, 30 Mar 2012 05:43:37 +0000 (07:43 +0200)
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>
Makefile
spl/Makefile

index e2a5a84b2015eb1a8dab594de4972c35d0af6612..8204312f0337da5ed701f90870cfaefedba168a0 100644 (file)
--- 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')
 
index 680f6dd1f67923464299adf0bbd2e7c004cd5350..ea7d4750fbebc5b91fa853d3e2043f7013c3adff 100644 (file)
@@ -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')