All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] kbuild: include config.mk when auto.conf is not older than .config
@ 2015-04-03  3:30 Masahiro Yamada
  2015-04-03 16:36 ` Stephen Warren
  2015-04-07 17:59 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2015-04-03  3:30 UTC (permalink / raw)
  To: u-boot

Since the Kconfig conversion, config.mk has been included only when
include/config/auto.conf is newer than the .config file.

It causes build error if both files have the same time-stamps.
It is actually possible because EXT* file systems have a 1s time-stamp
resolution.

The config.mk should be included when include/config/auto.conf is
*not older* than the .config file.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reported-by: Tom Rini <trini@konsulko.com>
Reported-by: York Sun <yorksun@freescale.com>
Reported-by: Stephen Warren <swarren@nvidia.com>
Reported-by: Matthew Gerlach <mgerlach@opensource.altera.com>
---

 Makefile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index f1bce44..53ad450 100644
--- a/Makefile
+++ b/Makefile
@@ -513,12 +513,16 @@ include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
 # is up-to-date. When we switch to a different board configuration, old CONFIG
 # macros are still remaining in include/config/auto.conf. Without the following
 # gimmick, wrong config.mk would be included leading nasty warnings/errors.
-autoconf_is_current := $(if $(wildcard $(KCONFIG_CONFIG)),$(shell find . \
-		-path ./include/config/auto.conf -newer $(KCONFIG_CONFIG)))
-ifneq ($(autoconf_is_current),)
+ifneq ($(wildcard $(KCONFIG_CONFIG)),)
+ifneq ($(wildcard include/config/auto.conf),)
+autoconf_is_old := $(shell find . -path ./$(KCONFIG_CONFIG) -newer \
+						include/config/auto.conf)
+ifeq ($(autoconf_is_old),)
 include $(srctree)/config.mk
 include $(srctree)/arch/$(ARCH)/Makefile
 endif
+endif
+endif
 
 # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
 # that (or fail if absent).  Otherwise, search for a linker script in a
-- 
1.9.1

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

* [U-Boot] [PATCH] kbuild: include config.mk when auto.conf is not older than .config
  2015-04-03  3:30 [U-Boot] [PATCH] kbuild: include config.mk when auto.conf is not older than .config Masahiro Yamada
@ 2015-04-03 16:36 ` Stephen Warren
  2015-04-07 17:59 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2015-04-03 16:36 UTC (permalink / raw)
  To: u-boot

On 04/02/2015 09:30 PM, Masahiro Yamada wrote:
> Since the Kconfig conversion, config.mk has been included only when
> include/config/auto.conf is newer than the .config file.
>
> It causes build error if both files have the same time-stamps.
> It is actually possible because EXT* file systems have a 1s time-stamp
> resolution.
>
> The config.mk should be included when include/config/auto.conf is
> *not older* than the .config file.

Tested-by: Stephen Warren <swarren@nvidia.com>

I ran a loop of 941 "MAKEALL rpi_2" during a meeting without issue. I 
also applied the same patch to a tree that had the timestamps set in a 
way that triggered the problem, and it immediately solved it there.

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

* [U-Boot] kbuild: include config.mk when auto.conf is not older than .config
  2015-04-03  3:30 [U-Boot] [PATCH] kbuild: include config.mk when auto.conf is not older than .config Masahiro Yamada
  2015-04-03 16:36 ` Stephen Warren
@ 2015-04-07 17:59 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2015-04-07 17:59 UTC (permalink / raw)
  To: u-boot

On Fri, Apr 03, 2015 at 12:30:25PM +0900, Masahiro Yamada wrote:

> Since the Kconfig conversion, config.mk has been included only when
> include/config/auto.conf is newer than the .config file.
> 
> It causes build error if both files have the same time-stamps.
> It is actually possible because EXT* file systems have a 1s time-stamp
> resolution.
> 
> The config.mk should be included when include/config/auto.conf is
> *not older* than the .config file.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reported-by: Tom Rini <trini@konsulko.com>
> Reported-by: York Sun <yorksun@freescale.com>
> Reported-by: Stephen Warren <swarren@nvidia.com>
> Reported-by: Matthew Gerlach <mgerlach@opensource.altera.com>
> Tested-by: Stephen Warren <swarren@nvidia.com>

Great job finally root causing this Stephen and then fixing it Masahiro!

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150407/0cd35de8/attachment.sig>

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

end of thread, other threads:[~2015-04-07 17:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-03  3:30 [U-Boot] [PATCH] kbuild: include config.mk when auto.conf is not older than .config Masahiro Yamada
2015-04-03 16:36 ` Stephen Warren
2015-04-07 17:59 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.