include/trusted-firmware-a.mk: remove the no-warn-rwx-segments hack
authorThomas Richard <thomas.richard@bootlin.com>
Fri, 29 Nov 2024 10:36:46 +0000 (11:36 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 22 Dec 2024 22:48:53 +0000 (23:48 +0100)
Since v2.12, TF-A automatically selects the no-warn-rwx-segments option if
needed.
So move this hack to the package Makefiles.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/17243
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/trusted-firmware-a.mk
package/boot/arm-trusted-firmware-bcm63xx/Makefile
package/boot/arm-trusted-firmware-mediatek/Makefile
package/boot/arm-trusted-firmware-mvebu/Makefile
package/boot/arm-trusted-firmware-rockchip/Makefile
package/boot/arm-trusted-firmware-stm32/Makefile
package/boot/arm-trusted-firmware-sunxi/Makefile
package/boot/rkbin/Makefile
package/boot/tfa-layerscape/Makefile

index e469dae9840087f2fe6c237efc1315ccebc0134b..b44cec8d07486d4855955350ac6999fafcdd795b 100644 (file)
@@ -83,7 +83,6 @@ define Build/Compile/Trusted-Firmware-A
                $(if $(DTC),DTC="$(DTC)") \
                PLAT=$(PLAT) \
                BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
-               $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
                $(TFA_MAKE_FLAGS)
 endef
 
index bcb5ce989203919a42acf0fd137ff19c4b64ee1b..385776ff59f622b6f6359de85f5d04a474a3f41e 100644 (file)
@@ -33,6 +33,7 @@ TFA_TARGETS:= \
        bcm4908
 
 TFA_MAKE_FLAGS += \
+       $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
        BRCM_CHIP=$(BRCM_CHIP)
 
 define Package/trusted-firmware-a/install
index c8988fa4003719e904d7b6ae585921710d89f95f..3046a01a586ae416cffb9205b0651cbab224b92a 100644 (file)
@@ -569,6 +569,7 @@ TFA_TARGETS:= \
        mt7988-spim-nand-ubi-comb
 
 TFA_MAKE_FLAGS += \
+       $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
        BOOT_DEVICE=$(BOOT_DEVICE) \
        USE_MKIMAGE=1 MKIMAGE=$(STAGING_DIR_HOST)/bin/mkimage \
        $(if $(findstring ddr4,$(DDR_TYPE)),DRAM_USE_DDR4=1) \
index 047c8db55e67b895f677e923ab8cd3d00dccd65b..7dd0f11d52ae8264e7797bd267c1e1c4f62b50eb 100644 (file)
@@ -119,6 +119,7 @@ TFA_TARGETS:= \
        edpu
 
 TFA_MAKE_FLAGS += \
+               $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
                CROSS_CM3=$(BUILD_DIR)/$(CM3_GCC_NAME)-$(CM3_GCC_RELEASE)-$(CM3_GCC_VERSION)/bin/arm-none-eabi- \
                BL33=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.bin \
                MV_DDR_PATH=$(BUILD_DIR)/$(MV_DDR_NAME) \
index 38a644efa38e49d5691101b753ee58d9ea508021..9073afe365248d0ac0cf144e3c7942c628f9f101 100644 (file)
@@ -37,6 +37,9 @@ TFA_TARGETS:= \
        rk3328 \
        rk3399
 
+TFA_MAKE_FLAGS+= \
+       $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments")
+
 ifeq ($(BUILD_VARIANT),rk3399)
   M0_GCC_NAME:=gcc-arm
   M0_GCC_RELEASE:=11.2-2022.02
index 75a92f15af6a37bb9f8f0e44a4608edb4e196c2f..9d36d39b0c9aa8d1406ea230d8372d2ea9332dcd 100644 (file)
@@ -41,6 +41,7 @@ endef
 TFA_TARGETS := stm32mp135f-dk
 
 TFA_MAKE_FLAGS += \
+               $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
                ARCH=aarch32 AARCH32_SP=optee \
                BL32=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-tee-header_v2.bin \
                BL32_EXTRA1=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-tee-pager_v2.bin \
index 4b007f8b039de098b1e4dda56d211fb42a05c183..4903c98cde1389c8ef4418d7e4b2cefe3bd45206 100644 (file)
@@ -46,6 +46,9 @@ TFA_TARGETS:= \
        sunxi-h6 \
        sunxi-h616
 
+TFA_MAKE_FLAGS+= \
+       $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments")
+
 define Package/trusted-firmware-a/install
        $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl31.bin $(STAGING_DIR_IMAGE)/bl31_$(BUILD_VARIANT).bin
index d895c06547b0b788efffa3badd280bc02695ccb3..fef19de7dc8c9481a14b64043ad8a54f0db4ef3b 100644 (file)
@@ -71,6 +71,9 @@ TFA_TARGETS:= \
        rk3568-e25 \
        rk3588
 
+TFA_MAKE_FLAGS+= \
+       $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments")
+
 ifeq ($(BUILD_VARIANT),rk3308-rock-pi-s)
   TPL_FILE:=rk3308_ddr_589MHz_uart0_m0_v2.07.bin
   define Download/rk3308-tpl-rock-pi-s
index 7304df55c713d814f882d541c4ff90b56152db1d..1302e35c40c953308db227eac85212bd84e9f028 100644 (file)
@@ -161,6 +161,7 @@ TFA_TARGETS := \
   lx2160a-rdb-sdboot
 
 TFA_MAKE_FLAGS += \
+       $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
        fip pbl \
        BOOT_MODE=$(BOOT_MODE) \
        RCW=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-rcw.bin \