Hello Patrick Georgi,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/38794
to review the following change.
Change subject: arch/arm64/Makefile.inc: Avoid # in variable definition ......................................................................
arch/arm64/Makefile.inc: Avoid # in variable definition
Interpretation if # starts a comment inside a variable definition varies between GNU make versions. Use a wildcard to match the first # and use `sed` instead of `grep | cut` to avoid unbalanced quoting chars.
Tested with GNU make 4.2.1 and 4.3. Both produce the same output as 4.2.1 did before the patch.
Change-Id: Ib7c4d7323e112968d3f14ea0590b7dabc57c9c45 Signed-off-by: Nico Huber nico.h@gmx.de --- M src/arch/arm64/Makefile.inc 1 file changed, 1 insertion(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/38794/1
diff --git a/src/arch/arm64/Makefile.inc b/src/arch/arm64/Makefile.inc index 1aee6b8..a8742f2 100644 --- a/src/arch/arm64/Makefile.inc +++ b/src/arch/arm64/Makefile.inc @@ -184,10 +184,7 @@ BL31_MAKEARGS += IS_ANYTHING_TO_BUILD=1
# Set a consistent build timestamp: the same coreboot has -# The # " complications exist to satisfy both gnu make's parser and editors -# with non-semantic quote-handling (that would assume that this line starts a -# multi line string. -BL31_MAKEARGS += BUILD_MESSAGE_TIMESTAMP='"$(shell grep "#define COREBOOT_BUILD>" $(obj)/build.h |cut -d" -f2 # ")"' +BL31_MAKEARGS += BUILD_MESSAGE_TIMESTAMP='"$(shell sed -n 's/^.define COREBOOT_BUILD>.*"(.*)".*/\1/p' $(obj)/build.h)"'
BL31_CFLAGS := -fno-pic -fno-stack-protector -Wno-deprecated-declarations -Wno-unused-function BL31_LDFLAGS := --emit-relocs