Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12361
-gerrit
commit 817635c731fb74fcde486a40c6b8dba8b4b97e1d Author: Patrick Georgi patrick@georgi-clan.de Date: Sun Nov 8 15:20:32 2015 +0100
build system: Make sure that build.h is generated before use
With an order-only dependency make sure enforce generation of build.h early enough that the race condition on highly parallel builds doesn't happen anymore.
Change-Id: I6eb83543ec4a995b3b3662f606fc43796ae68f7b Signed-off-by: Patrick Georgi patrick@georgi-clan.de --- Makefile.inc | 2 ++ src/arch/x86/Makefile.inc | 1 - src/lib/Makefile.inc | 6 ------ 3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc index 65aa71c..12f1cae 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -301,6 +301,8 @@ $(obj)/build.h: .xcompile util/genbuild_h/genbuild_h.sh > $(obj)/build.ht mv $(obj)/build.ht $(obj)/build.h
+%.o: | $(obj)/build.h + build-dirs: mkdir -p $(objcbfs) $(objgenerated)
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index 03dba34..21fa07d 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -81,7 +81,6 @@ endif # the right order. Make sure the auto generated bootblock.inc is a proper # dependency. Make the same true for the linker sript. bootblock-y += id.S -$(obj)/arch/x86/id.bootblock.o: $(obj)/build.h
bootblock-y += bootblock.S bootblock-y += walkcbfs.S diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 59b1317..f9a2792 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -172,12 +172,6 @@ ramstage-y += version.c smm-y += version.c verstage-y += version.c
-$(obj)/lib/version.bootblock.o : $(obj)/build.h -$(obj)/lib/version.romstage.o : $(obj)/build.h -$(obj)/lib/version.ramstage.o : $(obj)/build.h -$(obj)/lib/version.smm.o : $(obj)/build.h -$(obj)/lib/version.verstage.o : $(obj)/build.h - romstage-y += bootmode.c ramstage-y += bootmode.c