trusted-firmware-a.mk: fix build with binutils 2.39
authorDaniel Golle <daniel@makrotopia.org>
Fri, 2 Dec 2022 12:54:52 +0000 (12:54 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 5 Dec 2022 01:28:28 +0000 (01:28 +0000)
Starting from version 2.39 binutils now warns about sections with rwx
permissions. While this is generally desirable it breaks building
ARM TrustedFirmware-A bl2 which treats warnings as errors.
Disable the warning/error for now to fix build.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
include/trusted-firmware-a.mk

index 46fc52b15e400b2243ae3a243502592ccc6df26b..0b37c0f94382599c4e6ed7a207ca435dfef5eb4a 100644 (file)
@@ -81,6 +81,7 @@ 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_39),LDFLAGS="-no-warn-rwx-segments") \
                $(TFA_MAKE_FLAGS)
 endef