summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-12-11 13:06:40 +0100
committerNico Huber <nico.h@gmx.de>2018-12-11 16:19:15 +0000
commitd2c02420e2e43a957e249804f7037b01e9a69b06 (patch)
tree8d9c8b9ccdd56dc7f0d3f80722332dc8c6663bd3 /Makefile
parent1672b6c22c01f970205eb48dc2f28ce301818210 (diff)
downloadcoreboot-d2c02420e2e43a957e249804f7037b01e9a69b06.tar.gz
coreboot-d2c02420e2e43a957e249804f7037b01e9a69b06.tar.bz2
coreboot-d2c02420e2e43a957e249804f7037b01e9a69b06.zip
Makefile.inc: Avoid race condition when using 'make -j<N>'
When building coreboot from scratch with 'make -j4', I sometimes see this error: CREATE build/mainboard/emulation/qemu-riscv/cbfs-file.wblRgZ.out (from /.../coreboot/.config) HOSTCC cbfstool/cbfstool (link) make[1]: execvp: build/util/kconfig/conf: Permission denied make[1]: *** [/.../coreboot/util/kconfig/Makefile:92: savedefconfig] Error 127 It happens, I think, because the rule generated by cbfs-files-processor-defconfig runs 'make savedefconfig', which builds build/util/kconfig/conf, and something also builds it, at the same time. Fix this case, by making this rule depend on $(objutil)/kconfig/conf. The same fix is also precautiously applied to the rule for $(KCONFIG_AUTOHEADER) in Makefile. Change-Id: Ie93eda567f88ca08c97df7e70cdff5b07442747d Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/c/29984 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1d4a4889aff1..f12b61659e52 100644
--- a/Makefile
+++ b/Makefile
@@ -176,7 +176,7 @@ real-all: real-target
.SECONDEXPANSION:
.DELETE_ON_ERROR:
-$(KCONFIG_AUTOHEADER): $(KCONFIG_CONFIG)
+$(KCONFIG_AUTOHEADER): $(KCONFIG_CONFIG) $(objutil)/kconfig/conf
+$(MAKE) oldconfig
# Add a new class of source/object files to the build system