armbian-build/patch/atf/atf-imx8/0001-fix-needed-by-armbian-build-system.patch
Martin Schmiedel f1c6529d04 IMX8: fix build error (again)
- fixes: unrecognized option '-Wl,--no-warn-rwx-segment(s)'
    - adjust patch to atf that removes the unrecognized linker options
2025-10-30 12:08:07 +01:00

31 lines
925 B
Diff

From 5b8d60b91f18b31343ee26f25d1ec7c70ce9187e Mon Sep 17 00:00:00 2001
From: Martin Schmiedel <Martin.Schmiedel@tq-group.com>
Date: Wed, 28 May 2025 14:02:39 +0200
Subject: [PATCH] fix needed by armbian build system
remove possibly contained gcc linker flags
Signed-off-by: Martin Schmiedel <Martin.Schmiedel@tq-group.com>
---
Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Makefile b/Makefile
index ea5701347..5213a1199 100644
--- a/Makefile
+++ b/Makefile
@@ -343,6 +343,10 @@ GCC_V_OUTPUT := $(shell $(CC) -v 2>&1)
TF_LDFLAGS += -z noexecstack
+# remove possibly contained gcc linker flags we use the linker directly
+gcc_linker_flags = -Wl,--no-warn-rwx-segments -Wl,--no-warn-rwx-segment
+TF_LDFLAGS := $(filter-out $(gcc_linker_flags), $(TF_LDFLAGS))
+
# LD = armlink
ifneq ($(findstring armlink,$(notdir $(LD))),)
TF_LDFLAGS += --diag_error=warning --lto_level=O1
--
2.43.0