<p>Nico Huber <strong>merged</strong> this change.</p><p><a href="https://review.coreboot.org/c/coreboot/+/29984">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  build bot (Jenkins): Verified
  Nico Huber: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Makefile.inc: Avoid race condition when using 'make -j<N>'<br><br>When building coreboot from scratch with 'make -j4', I sometimes see<br>this error:<br><br>    CREATE     build/mainboard/emulation/qemu-riscv/cbfs-file.wblRgZ.out (from /.../coreboot/.config)<br>    HOSTCC     cbfstool/cbfstool (link)<br>make[1]: execvp: build/util/kconfig/conf: Permission denied<br>make[1]: *** [/.../coreboot/util/kconfig/Makefile:92: savedefconfig] Error 127<br><br>It happens, I think, because the rule generated by<br>cbfs-files-processor-defconfig runs 'make savedefconfig', which builds<br>build/util/kconfig/conf, and something also builds it, at the same time.<br>Fix this case, by making this rule depend on $(objutil)/kconfig/conf.<br><br>The same fix is also precautiously applied to the rule for<br>$(KCONFIG_AUTOHEADER) in Makefile.<br><br>Change-Id: Ie93eda567f88ca08c97df7e70cdff5b07442747d<br>Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net><br>Reviewed-on: https://review.coreboot.org/c/29984<br>Tested-by: build bot (Jenkins) <no-reply@coreboot.org><br>Reviewed-by: Nico Huber <nico.h@gmx.de><br>---<br>M Makefile<br>M Makefile.inc<br>2 files changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/Makefile b/Makefile</span><br><span>index 1d4a488..f12b616 100644</span><br><span>--- a/Makefile</span><br><span>+++ b/Makefile</span><br><span>@@ -176,7 +176,7 @@</span><br><span> .SECONDEXPANSION:</span><br><span> .DELETE_ON_ERROR:</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-$(KCONFIG_AUTOHEADER): $(KCONFIG_CONFIG)</span><br><span style="color: hsl(120, 100%, 40%);">+$(KCONFIG_AUTOHEADER): $(KCONFIG_CONFIG) $(objutil)/kconfig/conf</span><br><span>       +$(MAKE) oldconfig</span><br><span> </span><br><span> # Add a new class of source/object files to the build system</span><br><span>diff --git a/Makefile.inc b/Makefile.inc</span><br><span>index 1d6a671..f684f59 100644</span><br><span>--- a/Makefile.inc</span><br><span>+++ b/Makefile.inc</span><br><span>@@ -287,7 +287,7 @@</span><br><span> # arg1: input</span><br><span> # arg2: output</span><br><span> cbfs-files-processor-defconfig= \</span><br><span style="color: hsl(0, 100%, 40%);">-       $(eval $(2): $(1) $(obj)/build.h; \</span><br><span style="color: hsl(120, 100%, 40%);">+   $(eval $(2): $(1) $(obj)/build.h $(objutil)/kconfig/conf; \</span><br><span>          +printf "    CREATE     $(2) (from $(1))\n"; \</span><br><span>             printf "\# This image was built using coreboot " > $(2).tmp && \</span><br><span>                grep "\<COREBOOT_VERSION\>" $(obj)/build.h |cut -d\" -f2 >> $(2).tmp && \</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/29984">change 29984</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/c/coreboot/+/29984"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ie93eda567f88ca08c97df7e70cdff5b07442747d </div>
<div style="display:none"> Gerrit-Change-Number: 29984 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer@gmx.net> </div>
<div style="display:none"> Gerrit-Reviewer: Jonathan Neuschäfer <j.neuschaefer@gmx.net> </div>
<div style="display:none"> Gerrit-Reviewer: Martin Roth <martinroth@google.com> </div>
<div style="display:none"> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> </div>
<div style="display:none"> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>