kbuild: include config.mk when auto.conf is not older than .config
PATCH 1/1 kbuild: include config.mk when auto.conf is not older than .config
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.
---
Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Makefile +7 -3
@@ -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
Signature · 1 line
1.9.1
PATCH 1/1 kbuild: include config.mk when auto.conf is not older than .config
Quoted 9 lines · Masahiro Yamada
Since the
Kconfigconversion, config.mk has been included only wheninclude/config/auto.confis 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.confis *not older* than the .config file.
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.
Quoted 10 lines · Masahiro Yamada
Since the
Kconfigconversion, config.mk has been included only wheninclude/config/auto.confis 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.confis *not older* than the .config file.
Quoted 6 lines
Signed-off-by Masahiro Yamada <[email protected]>Reported-by Tom Rini <[email protected]>Reported-by York Sun <[email protected]>Reported-by Stephen Warren <[email protected]>Reported-by Matthew Gerlach <[email protected]>Tested-by Stephen Warren <[email protected]>
Great job finally root causing this Stephen and then fixing it Masahiro!
Applied to u-boot/master, thanks!
Signature · 8 lines
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>