[coreboot-gerrit] New patch to review for coreboot: 8886d57 Makefile: Fix dependency tracking for ramstage objects

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Thu Apr 16 14:01:15 CEST 2015


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

-gerrit

commit 8886d5724b9b90c23d06c4cd90a7fbdfe94b8b0e
Author: Julius Werner <jwerner at chromium.org>
Date:   Fri Dec 5 12:32:09 2014 -0800

    Makefile: Fix dependency tracking for ramstage objects
    
    Dependency tracking in incremental builds is currently broken for the
    ramstage, due to the intermediate linking step into one ramstage.o file
    per directory. The original xxx.ramstage.o files are removed from
    ramstage-objs, so they don't end up in allobjs and won't get translated
    into DEPENDENCIES. This patch explicitly adds them to DEPENDENCIES
    beforehand to resolve the issue.
    
    BRANCH=None
    BUG=None
    TEST=Built, ran 'touch src/include/cbmem.h' and built again
    incrementally. Confirmed that objects dependent on the modified header
    such as timestamp.ramstage.o get rebuilt correctly.
    
    Change-Id: I3ba411e4073b38e038445aadceeccfe6c09670c8
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: 9c57d6a8421a109ee3e87567c9add579f9ae761e
    Original-Change-Id: Ife529ad8f5c011456c1e0c380356f1b1bb5047cb
    Original-Signed-off-by: Julius Werner <jwerner at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/233571
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
 Makefile     | 2 +-
 Makefile.inc | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 395910f..3c57608 100644
--- a/Makefile
+++ b/Makefile
@@ -249,7 +249,7 @@ $(foreach class,$(classes), \
 foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(basename $(file)))))
 $(eval $(foreach class,$(classes),$(call foreach-src,$(class))))
 
-DEPENDENCIES = $(addsuffix .d,$(basename $(allobjs)))
+DEPENDENCIES += $(addsuffix .d,$(basename $(allobjs)))
 -include $(DEPENDENCIES)
 
 printall:
diff --git a/Makefile.inc b/Makefile.inc
index 9c043c4..204e518 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -112,7 +112,8 @@ files-in-dir=$(filter-out $(call dir-wildcards,$(call filter-out-dirs,$(1),$(sor
 #######################################################################
 # reduce command line length by linking the objects of each
 # directory into an intermediate file
-ramstage-postprocess=$(foreach d,$(sort $(dir $(filter-out %.ld,$(1)))), \
+ramstage-postprocess=$$(eval DEPENDENCIES+=$$(addsuffix .d,$$(basename $(1)))) \
+	$(foreach d,$(sort $(dir $(filter-out %.ld,$(1)))), \
 	$(eval $(d)ramstage.o: $(call files-in-dir,$(d),$(filter-out %.ld,$(1))); $$(LD_ramstage) -o $$@ -r $$^ ) \
 	$(eval ramstage-objs:=$(d)ramstage.o $(filter-out $(filter-out %.ld, $(call files-in-dir,$(d),$(1))),$(ramstage-objs))))
 



More information about the coreboot-gerrit mailing list