Skip to contentSkip to conversation

add target for $(LDSCRIPT)

PATCH New Mike Frysinger 2 participants 2 messages Feb 16, 2008 – Feb 22, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add target for $(LDSCRIPT)

If the $(LDSCRIPT) does not exist (normally it's board/$(BOARD)/u-boot.lds), then change into the board directory and try and create it. This allows you to generate the linker script on the fly based upon board defines (like the Blackfin boards do).

There should be no regressions due to this change as the normal case is to already have a u-boot.lds file. If that's the case, then there's nothing to generate, and so make will always exit. The fix here is that if the linker script does not exist, the implicit rules take over and attempt to guess how to generate the file.

---
 Makefile |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Makefile +3 -0
index a731ee8..7446bc7 100644
@@ -326,6 +326,9 @@ $(LIBS):	depend $(obj)include/autoconf.mk
 $(SUBDIRS):	depend $(obj)include/autoconf.mk
 		$(MAKE) -C $@ all
 
+$(LDSCRIPT):	depend $(obj)include/autoconf.mk
+		$(MAKE) -C $(dir $@) $(notdir $@)
+
 $(NAND_SPL):	$(VERSION_FILE)	$(obj)include/autoconf.mk
 		$(MAKE) -C nand_spl/board/$(BOARDDIR) all
 
Signature · 1 line
1.5.4
#1 lore raw

PATCH 1/1 add target for $(LDSCRIPT)

Quoted 11 lines · In message <[email protected]> you wrote:

If the $(LDSCRIPT) does not exist (normally it's board/$(BOARD)/u-boot.lds), then change into the board directory and try and create it. This allows you to generate the linker script on the fly based upon board defines (like the Blackfin boards do).

There should be no regressions due to this change as the normal case is to already have a u-boot.lds file. If that's the case, then there's nothing to generate, and so make will always exit. The fix here is that if the linker script does not exist, the implicit rules take over and attempt to guess how to generate the file.

Quoted 4 lines
---
 Makefile |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Use the Force, Luke.