Message ID | 20220729210444.1787668-1-arnout@mind.be |
---|---|
State | Accepted |
Headers | show |
Series | boot/arm-trusted-firmware: set CFLAGS from environment, not override | expand |
Arnout, All, On 2022-07-29 23:04 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly: > 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) <arnout@mind.be> > Cc: Kory Maincent <kory.maincent@bootlin.com> Applied to master, thanks. Regards, Yann E. MORIN. > --- > v2: updated commit message to show that it's fine for new versions as > well. > --- > 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) > -- > 2.35.3 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot
>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes: > 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) <arnout@mind.be> > Cc: Kory Maincent <kory.maincent@bootlin.com> > --- > v2: updated commit message to show that it's fine for new versions as > well. Committed to 2022.05.x and 2022.02.x, thanks.
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)
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) <arnout@mind.be> Cc: Kory Maincent <kory.maincent@bootlin.com> --- v2: updated commit message to show that it's fine for new versions as well. --- boot/arm-trusted-firmware/arm-trusted-firmware.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)