From df52e2600deef3fff250d337d06f55863d1dfd76 Mon Sep 17 00:00:00 2001 From: Chris Kay Date: Wed, 29 May 2024 20:37:33 +0000 Subject: [PATCH] fix(build): fix incorrectly-escaped armlink preprocessor definitions Preprocessor definitions that are passed to armlink are currently not correctly escaped, resulting in the shell trying to parse the parentheses contained in some of the preprocessor definitions: ``` LD build/tegra/t210/release/bl31/bl31.elf /bin/sh: 1: Syntax error: "(" unexpected ``` This change ensures that these preprocessor definitions are adequately escaped for the shell. Change-Id: I9d2c60fa60c0aa00770417a68f900e9fb84b4669 Signed-off-by: Chris Kay --- make_helpers/build_macros.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index cf4595cd3..fabd74ede 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -559,8 +559,8 @@ $(ELF): $(OBJS) $(DEFAULT_LINKER_SCRIPT) $(LINKER_SCRIPTS) | $(1)_dirs libraries $$(ECHO) " LD $$@" ifeq ($($(ARCH)-ld-id),arm-link) $$(Q)$($(ARCH)-ld) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) --entry=${1}_entrypoint \ - --predefine="-D__LINKER__=$(__LINKER__)" \ - --predefine="-DTF_CFLAGS=$(TF_CFLAGS)" \ + --predefine=$(call escape-shell,-D__LINKER__=$(__LINKER__)) \ + --predefine=$(call escape-shell,-DTF_CFLAGS=$(TF_CFLAGS)) \ --map --list="$(MAPFILE)" --scatter=${PLAT_DIR}/scat/${1}.scat \ $(LDPATHS) $(LIBWRAPPER) $(LDLIBS) $(BL_LIBS) $(OBJS) else ifeq ($($(ARCH)-ld-id),gnu-gcc)