blob: 403381c9d6cebc7bc9ddc3f5f8713bf61320c2ba [file] [log] [blame]
Patrick Williams705982a2024-01-12 09:51:57 -06001From 051c723a6463a579b05dcaa81f204516737a3645 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com>
3Date: Wed, 9 Aug 2023 15:56:03 -0400
4Subject: [PATCH] Binutils 2.39 now warns when a segment has RXW
5 permissions[1]:
Patrick Williams92b42cb2022-09-03 06:53:57 -05006
7aarch64-none-elf-ld.bfd: warning: bl31.elf has a LOAD segment with RWX
8permissions
9
10However, TF-A passes --fatal-warnings to LD, so this is a build failure.
11
12There is a ticket filed upstream[2], so until that is resolved just
13remove --fatal-warnings.
14
15[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
16[2] https://developer.trustedfirmware.org/T996
17
18Upstream-Status: Inappropriate
19Signed-off-by: Ross Burton <ross.burton@arm.com>
Patrick Williams705982a2024-01-12 09:51:57 -060020---
21 Makefile | 4 ++--
22 1 file changed, 2 insertions(+), 2 deletions(-)
Patrick Williams92b42cb2022-09-03 06:53:57 -050023
24diff --git a/Makefile b/Makefile
Patrick Williams705982a2024-01-12 09:51:57 -060025index 1ddb7b84417d..9eae30c923ec 100644
Patrick Williams92b42cb2022-09-03 06:53:57 -050026--- a/Makefile
27+++ b/Makefile
Patrick Williams705982a2024-01-12 09:51:57 -060028@@ -425,7 +425,7 @@ TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH))
Patrick Williams92b42cb2022-09-03 06:53:57 -050029 # LD = gcc (used when GCC LTO is enabled)
30 else ifneq ($(findstring gcc,$(notdir $(LD))),)
31 # Pass ld options with Wl or Xlinker switches
32-TF_LDFLAGS += -Wl,--fatal-warnings -O1
33+TF_LDFLAGS += -O1
34 TF_LDFLAGS += -Wl,--gc-sections
35 ifeq ($(ENABLE_LTO),1)
36 ifeq (${ARCH},aarch64)
Patrick Williams705982a2024-01-12 09:51:57 -060037@@ -442,7 +442,7 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
Patrick Williams92b42cb2022-09-03 06:53:57 -050038
39 # LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
40 else
41-TF_LDFLAGS += --fatal-warnings -O1
42+TF_LDFLAGS += -O1
43 TF_LDFLAGS += --gc-sections
44 # ld.lld doesn't recognize the errata flags,
45 # therefore don't add those in that case