From ccac9a5bbbd7374187a0f0017101ece0c202851d Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Mon, 16 Aug 2021 06:30:11 +0300 Subject: [PATCH] boot/arm-trusted-firmware: don't force ENABLE_STACK_PROTECTOR MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit 5f432df7e2d2 ("boot/arm-trusted-firmware: change ENABLE_STACK_PROTECTOR value when disabled") set ENABLE_STACK_PROTECTOR=0 when disabled. But since we pass this value as MAKE_OPT, the internal ATF logic that sets ENABLE_STACK_PROTECTOR again based on its initial value breaks. This leads to build failure: make[1]: *** [/builds/buildroot.org/buildroot/output/build/arm-trusted-firmware-v2.4/build/a80x0_mcbin/release/libc/assert.o] Error 1 aarch64-buildroot-linux-uclibc-gcc.br_real: error: unrecognized command-line option ‘-fstack-protector-0’; did you mean ‘-fstack-protector’? Move ENABLE_STACK_PROTECTOR to make environment instead to allow make to change its value. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/1497663294 Cc: Dick Olsson Cc: Sergey Matyukevich Cc: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- boot/arm-trusted-firmware/arm-trusted-firmware.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk index 1f08f5dabb..00b68a30af 100644 --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk @@ -51,7 +51,10 @@ endif ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \ CROSS_COMPILE="$(TARGET_CROSS)" \ $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES)) \ - PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) \ + PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) + +ARM_TRUSTED_FIRMWARE_MAKE_ENV += \ + $(TARGET_MAKE_ENV) \ ENABLE_STACK_PROTECTOR=$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP_LEVEL)) ifeq ($(BR2_ARM_CPU_ARMV7A),y) @@ -164,7 +167,8 @@ ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += \ define ARM_TRUSTED_FIRMWARE_BUILD_CMDS $(ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL) - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \ + $(ARM_TRUSTED_FIRMWARE_MAKE_ENV) $(MAKE) -C $(@D) \ + $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \ $(ARM_TRUSTED_FIRMWARE_MAKE_TARGETS) $(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_BUILD) endef -- 2.30.2