]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
Blackfin: fix out-of-tree building with ldscripts
authorMike Frysinger <vapier@gentoo.org>
Fri, 24 Oct 2008 21:51:57 +0000 (17:51 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 7 Jan 2009 07:59:50 +0000 (02:59 -0500)
Many of the Blackfin board linker scripts are preprocessed, so make sure we
output the linker script into the build tree rather than the source tree.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
board/bf533-ezkit/Makefile
board/bf533-ezkit/config.mk
board/bf533-stamp/Makefile
board/bf533-stamp/config.mk
board/bf537-stamp/Makefile
board/bf537-stamp/config.mk
board/bf561-ezkit/Makefile
board/bf561-ezkit/config.mk

index b2d7acffee5721e3d1e3dff19eee8cc60fa880ff..6a45b7cb278647790dd596d0af4f8051e46b1c97 100644 (file)
@@ -35,12 +35,11 @@ SRCS        := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS) u-boot.lds
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS) $(obj)u-boot.lds
        $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
-u-boot.lds: u-boot.lds.S
-       $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -P -Ubfin $^ > $@.tmp
-       mv -f $@.tmp $@
+$(obj)u-boot.lds: u-boot.lds.S
+       $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -P $^ > $@
 
 clean:
        rm -f $(SOBJS) $(OBJS)
index 984792476b7f2263a3d7d973570c7a9b265b71d8..c8b9fb8c15eb4f4a413539814b1967c63f3c2378 100644 (file)
@@ -26,6 +26,8 @@
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+LDSCRIPT = $(obj)board/$(BOARDDIR)/u-boot.lds
+
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
index 21f6ad1b45a923354d2234320e9775bbd0670f70..5ae022885e4a9630fce4e5ae0d6b966271b512df 100644 (file)
@@ -35,12 +35,11 @@ SRCS        := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS) u-boot.lds
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS) $(obj)u-boot.lds
        $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
-u-boot.lds: u-boot.lds.S
-       $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -P -Ubfin $^ > $@.tmp
-       mv -f $@.tmp $@
+$(obj)u-boot.lds: u-boot.lds.S
+       $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -P $^ > $@
 
 clean:
        rm -f $(SOBJS) $(OBJS)
index 984792476b7f2263a3d7d973570c7a9b265b71d8..c8b9fb8c15eb4f4a413539814b1967c63f3c2378 100644 (file)
@@ -26,6 +26,8 @@
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+LDSCRIPT = $(obj)board/$(BOARDDIR)/u-boot.lds
+
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
index e5481bfc55577a7717a74d9e0859da6b3fdbaac1..e5ef9af5c598ed994bd8acd5c2b1f572b8cc15dd 100644 (file)
@@ -35,12 +35,11 @@ SRCS        := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS) u-boot.lds
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS) $(obj)u-boot.lds
        $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
-u-boot.lds: u-boot.lds.S
-       $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -P -Ubfin $^ > $@.tmp
-       mv -f $@.tmp $@
+$(obj)u-boot.lds: u-boot.lds.S
+       $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -P $^ > $@
 
 clean:
        rm -f $(SOBJS) $(OBJS)
index d9e884e0e16ab59250073c8ec8cc5f67ff2b4c91..719b97e2541d8665b2c3ec962aa3d65c0a8d43f4 100644 (file)
@@ -26,6 +26,8 @@
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+LDSCRIPT = $(obj)board/$(BOARDDIR)/u-boot.lds
+
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6
index a1a4433fc1bcd899b7acd305a0e634009c916a7d..e7ee2435698ddd30d7312cd53b1055dd29bc65d3 100644 (file)
@@ -35,12 +35,11 @@ SRCS        := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(obj).depend $(OBJS) $(SOBJS) u-boot.lds
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS) $(obj)u-boot.lds
        $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
-u-boot.lds: u-boot.lds.S
-       $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -P -Ubfin $^ > $@.tmp
-       mv -f $@.tmp $@
+$(obj)u-boot.lds: u-boot.lds.S
+       $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -P $^ > $@
 
 clean:
        rm -f $(SOBJS) $(OBJS)
index 77c888b3bd39e9b626584cfc4004dcb82d8ad89f..710809a9e393c3f20cb3a215f95e57cd89a8a2df 100644 (file)
@@ -26,6 +26,8 @@
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+LDSCRIPT = $(obj)board/$(BOARDDIR)/u-boot.lds
+
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
 LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))