From 4d919211edc362abd2f3226a2376a15d0b3365ca Mon Sep 17 00:00:00 2001 From: "Arnout Vandecappelle (Essensium/Mind)" Date: Fri, 29 Jul 2022 23:04:44 +0200 Subject: [PATCH] boot/arm-trusted-firmware: set CFLAGS from environment, not override Older versions of TF-A don't support setting CFLAGS on the make command line. They use 'CFLAGS += ...' in the Makefile, which is still overridden by the CFLAGS on the command line. Fix this by moving the CFLAGS setting to the environment. Both older and newer versions of TF-A handle this correctly. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/2781800954 and a large number of other defconfigs Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Cc: Kory Maincent Signed-off-by: Yann E. MORIN --- boot/arm-trusted-firmware/arm-trusted-firmware.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk index 6b0405a44a..7c4e7edb00 100644 --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk @@ -60,13 +60,13 @@ endif ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \ CROSS_COMPILE="$(TARGET_CROSS)" \ - $(if $(BR2_PIC_PIE),CFLAGS="-fno-PIE") \ $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES)) \ PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) \ TARGET_BOARD=$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD) ARM_TRUSTED_FIRMWARE_MAKE_ENV += \ $(TARGET_MAKE_ENV) \ + $(if $(BR2_PIC_PIE),CFLAGS="-fno-PIE") \ ENABLE_STACK_PROTECTOR=$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP_LEVEL)) ifeq ($(BR2_ARM_CPU_ARMV7A),y)