Re: [PATCH 7/7] kbuild: link vmlinux just once for CONFIG_TRIM_UNUSED_KSYMS

From: Nicolas Pitre
Date: Thu Mar 15 2018 - 14:50:26 EST


On Thu, 15 Mar 2018, Masahiro Yamada wrote:

> I am not familiar with Make internal, but
> I can test it with simple code.
>
>
> [Test Makefile]
> A: B
> cp B A
> echo $?
>
> B: C
> cp C B
> touch A
>
> [Result]
> $ rm -rf A B C
> $ touch C
> $ make
> cp C B
> touch A
> cp B A
> echo B
> B
>
>
> In the recipe of 'B', 'A' is touched,
> so the dependency 'A: B' has already been met
> before the recipe of 'A' is executed,
> but Make does not notice that fact,
> then tries to update 'A'.
>
>
> The situation is the same.
> vmlinux has been updated in the recursed sub-make,
> but it is not noticed.

OK, I agree.


Nicolas