the following patch was just integrated into master: commit a32b6f0b7d3f35f58d2cfefd8d28c46a80a78ef7 Author: Julius Werner jwerner@chromium.org Date: Thu Mar 12 23:17:16 2015 -0700
Makefile: Avoid duplicate class suffixes in $(call src-to-obj)
The build system uses the $(src-to-obj) function in multiple places to figure out the corresponding output object file for a certan source file, most importantly when generating the rule to build it. Usually this is pretty simple, but some odd cases are a little tricky... such as the auto-generated intermediary C files containing an array definition generated from an ASL file. These files have already been compiled per stage, so they contain the stage as a suffix and reside in the build directory (e.g. build/.../dsdt.ramstage.c).
The previous $(src-to-obj) implementation just blindly appends the stage again and turns this into build/.../dsdt.ramstage.ramstage.o. This isn't very useful, so to avoid confusion this patch makes it strip additional stage suffixes for those intermediary files.
This also fixes a bug with the ASL postprocessor, which didn't take this double suffix into account: it added build/.../dsdt.ramstage.o to ramstage-objs which should've been build/.../dsdt.ramstage.ramstage.o. This only worked by accident because make compiled the file with its implicit %.o: %.c rule instead.
BRANCH=none BUG=chromium:466469 TEST=emerge-falco coreboot with the new make 4.1. Also build Falco and Veyron_Jerry with make -r -R to make sure there are no other accidental uses of implicit rules in our build system.
Change-Id: I4aeaa60add1ef4215cb6c0b222c3886395c7a045 Signed-off-by: Patrick Georgi pgeorgi@chromium.org Original-Commit-Id: d9ea2e082eca1045409ea1f403082c97dedc70d8 Original-Change-Id: I951edbc9f653321a9084543a65009c6e9154d819 Original-Signed-off-by: Julius Werner jwerner@chromium.org Original-Reviewed-on: https://chromium-review.googlesource.com/259950 Original-Reviewed-by: Mike Frysinger vapier@chromium.org Original-Reviewed-by: Patrick Georgi pgeorgi@chromium.org Reviewed-on: http://review.coreboot.org/9861 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer stefan.reinauer@coreboot.org
See http://review.coreboot.org/9861 for details.
-gerrit