Jonathan Neuschäfer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/29984
Change subject: Makefile.inc: Avoid race condition when using 'make -j<N>' ......................................................................
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.
Change-Id: Ie93eda567f88ca08c97df7e70cdff5b07442747d Signed-off-by: Jonathan Neuschäfer j.neuschaefer@gmx.net --- M Makefile.inc 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/29984/1
diff --git a/Makefile.inc b/Makefile.inc index aaae7bc..6a702a2 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -287,7 +287,7 @@ # arg1: input # arg2: output cbfs-files-processor-defconfig= \ - $(eval $(2): $(1) $(obj)/build.h; \ + $(eval $(2): $(1) $(obj)/build.h $(objutil)/kconfig/conf; \ +printf " CREATE $(2) (from $(1))\n"; \ printf "# This image was built using coreboot " > $(2).tmp && \ grep "<COREBOOT_VERSION>" $(obj)/build.h |cut -d" -f2 >> $(2).tmp && \