Skip to contentSkip to conversation

build: Use filechk rules to create and update u-boot.lds

PATCH In review Jon Loeliger 2 participants 2 messages Apr 15, 2014 – Apr 18, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: Use filechk rules to create and update u-boot.lds

Prior to this patch, the top-level linker script u-boot.lds used a simple $(call if_changed) check when generated. That mechanism misses cases where a possible include file change induces a change in the u-boot.lds too.

This patch converts it to a stronger check using ($call filechk) that will also notice differences in file contents and will catch changes due to pre-processing as well.

---
 Makefile | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Makefile +5 -4
index b807e5c..dcc42b2 100644
@@ -1052,12 +1052,13 @@ depend dep:
 	@echo '*** Warning: make $@ is unnecessary now.'
 
 # ---------------------------------------------------------------------------
-quiet_cmd_cpp_lds = LDS     $@
-cmd_cpp_lds = $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ \
-		-x assembler-with-cpp -P -o $@ $<
+define filechk_ubootlds
+	($(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ \
+		-x assembler-with-cpp -P -o - -)
+endef
 
 u-boot.lds: $(LDSCRIPT) prepare FORCE
-	$(call if_changed,cpp_lds)
+	$(call filechk,ubootlds)
 
 PHONY += nand_spl
 nand_spl: prepare
Signature · 1 line
1.9.0
#1 lore raw
Quoted 10 lines · Jon Loeliger

Prior to this patch, the top-level linker script u-boot.lds used a simple $(call if_changed) check when generated. That mechanism misses cases where a possible include file change induces a change in the u-boot.lds too.

This patch converts it to a stronger check using ($call filechk) that will also notice differences in file contents and will catch changes due to pre-processing as well.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140418/b2ee1e97/attachment.pgp>