[coreboot-gerrit] New patch to review for coreboot: build system: Make sure that build.h is generated before use

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Sun Nov 8 15:21:49 CET 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12361

-gerrit

commit 537ae7531e9bfc7343b6566aed18dbe0dbd8c717
Author: Patrick Georgi <patrick at 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 at 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 5b8e4dc..68c3c9a 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 7b90819..15f65d3 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -166,12 +166,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
 



More information about the coreboot-gerrit mailing list