public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Revert "build: Use filechk rules to create and update u-boot.lds"
@ 2014-04-21  2:33 Masahiro Yamada
  2014-04-21 14:35 ` Jon Loeliger
  2014-04-23 12:45 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2014-04-21  2:33 UTC (permalink / raw)
  To: u-boot

This reverts commit a8b993eb81c142a439c24b871a2317f765fe5397.

Commit a8b993eb claims it fixes u-boot.lds rule by replacing
$(call if_changed) with $(call filechk).

But the problem had already been fixed by commit 395e60cd
a few days before commit a8b993eb was posted.

There is no reason to apply commit a8b993eb. What is worse is
$(call filechk) is too strong to fix the problem and looks weird.

Date of the two patches:

[1] commit 395e60cdc292dc0183c6867d34b43f14a373df55
    Author:     Masahiro Yamada <yamada.m@jp.panasonic.com>
    AuthorDate: Wed Apr 9 20:10:43 2014 +0900
    Commit:     Tom Rini <trini@ti.com>
    CommitDate: Fri Apr 11 10:08:42 2014 -0400
replaces $(call if_changed) -> $(call if_changed_dep)

[2] commit a8b993eb81c142a439c24b871a2317f765fe5397
    Author:     Jon Loeliger <jon.loeliger@oracle.com>
    AuthorDate: Tue Apr 15 16:09:37 2014 -0500
    Commit:     Tom Rini <trini@ti.com>
    CommitDate: Fri Apr 18 16:14:16 2014 -0400
replaces $(call if_changed) -> $(call filechk)

A conflict must have happened when applying [2], but somehow it was
applied, sadly.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jon Loeliger <jon.loeliger@oracle.com>
Cc: Andreas Bie?mann <andreas.devel@googlemail.com>
Cc: Tom Rini <trini@ti.com>
---
 Makefile | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index e78228d..09a370f 100644
--- a/Makefile
+++ b/Makefile
@@ -1096,13 +1096,12 @@ depend dep:
 	@echo '*** Warning: make $@ is unnecessary now.'
 
 # ---------------------------------------------------------------------------
-define filechk_ubootlds
-	($(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \
-		-D__ASSEMBLY__ -x assembler-with-cpp -P -o - -)
-endef
+quiet_cmd_cpp_lds = LDS     $@
+cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \
+		-D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $<
 
 u-boot.lds: $(LDSCRIPT) prepare FORCE
-	$(call filechk,ubootlds)
+	$(call if_changed_dep,cpp_lds)
 
 PHONY += nand_spl
 nand_spl: prepare
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] Revert "build: Use filechk rules to create and update u-boot.lds"
  2014-04-21  2:33 [U-Boot] [PATCH] Revert "build: Use filechk rules to create and update u-boot.lds" Masahiro Yamada
@ 2014-04-21 14:35 ` Jon Loeliger
  2014-04-22  1:32   ` Masahiro Yamada
  2014-04-23 12:45 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Jon Loeliger @ 2014-04-21 14:35 UTC (permalink / raw)
  To: u-boot

On 04/20/2014 09:33 PM, Masahiro Yamada wrote:
> This reverts commit a8b993eb81c142a439c24b871a2317f765fe5397.
>
> Commit a8b993eb claims it fixes u-boot.lds rule by replacing
> $(call if_changed) with $(call filechk).
>
> But the problem had already been fixed by commit 395e60cd
> a few days before commit a8b993eb was posted.


Bummer.  Sorry about that.  I didn't see Masahiro's patch.


 > What is worse is
 > $(call filechk) is too strong to fix the problem and looks weird.

I'm sure I don't understand that critique at all.  "Looks weird"?

However, your patch (395e60cdc) is better in that it catches both
the regular top-level and the SPL build's load scripts.  Mine did not.

jdl

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] Revert "build: Use filechk rules to create and update u-boot.lds"
  2014-04-21 14:35 ` Jon Loeliger
@ 2014-04-22  1:32   ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2014-04-22  1:32 UTC (permalink / raw)
  To: u-boot

Hi Jon,


>  > What is worse is
>  > $(call filechk) is too strong to fix the problem and looks weird.
> 
> I'm sure I don't understand that critique at all.  "Looks weird"?


The linker script is processed by C-preprocessor.
It means the dependency of included files should be tracked
to decide if the linker script should be updated or not.
This is the same as the rule of  generationg objects.
( *.c -> *.o  or  *.S -> *.o)

$(call filechk ) does not do this dependency tracking
and always runs the preprocessor.

The why it looks weird to me.



Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Revert "build: Use filechk rules to create and update u-boot.lds"
  2014-04-21  2:33 [U-Boot] [PATCH] Revert "build: Use filechk rules to create and update u-boot.lds" Masahiro Yamada
  2014-04-21 14:35 ` Jon Loeliger
@ 2014-04-23 12:45 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2014-04-23 12:45 UTC (permalink / raw)
  To: u-boot

On Mon, Apr 21, 2014 at 11:33:07AM +0900, Masahiro Yamada wrote:

> This reverts commit a8b993eb81c142a439c24b871a2317f765fe5397.
> 
> Commit a8b993eb claims it fixes u-boot.lds rule by replacing
> $(call if_changed) with $(call filechk).
> 
> But the problem had already been fixed by commit 395e60cd
> a few days before commit a8b993eb was posted.
> 
> There is no reason to apply commit a8b993eb. What is worse is
> $(call filechk) is too strong to fix the problem and looks weird.
> 
> Date of the two patches:
> 
> [1] commit 395e60cdc292dc0183c6867d34b43f14a373df55
>     Author:     Masahiro Yamada <yamada.m@jp.panasonic.com>
>     AuthorDate: Wed Apr 9 20:10:43 2014 +0900
>     Commit:     Tom Rini <trini@ti.com>
>     CommitDate: Fri Apr 11 10:08:42 2014 -0400
> replaces $(call if_changed) -> $(call if_changed_dep)
> 
> [2] commit a8b993eb81c142a439c24b871a2317f765fe5397
>     Author:     Jon Loeliger <jon.loeliger@oracle.com>
>     AuthorDate: Tue Apr 15 16:09:37 2014 -0500
>     Commit:     Tom Rini <trini@ti.com>
>     CommitDate: Fri Apr 18 16:14:16 2014 -0400
> replaces $(call if_changed) -> $(call filechk)
> 
> A conflict must have happened when applying [2], but somehow it was
> applied, sadly.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Jon Loeliger <jon.loeliger@oracle.com>
> Cc: Andreas Bie?mann <andreas.devel@googlemail.com>
> Cc: Tom Rini <trini@ti.com>

Whoops, Applied to u-boot/master, thanks!

-- 
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/20140423/918592b0/attachment.pgp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-23 12:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-21  2:33 [U-Boot] [PATCH] Revert "build: Use filechk rules to create and update u-boot.lds" Masahiro Yamada
2014-04-21 14:35 ` Jon Loeliger
2014-04-22  1:32   ` Masahiro Yamada
2014-04-23 12:45 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox