armbian-build/patch/atf/atf-rockchip64/v2.13/1001-2.13-rk3399-m0-LDFLAGS-no-pie.patch
Ricardo Pardini 9e7f6dc264 rockchip64: patch ATF 2.13 to build on gcc-14+ (ref rk3399's m0)
- move patches into version folder (`atf-rockchip` -> `atf-rockchip/v2.13`)
- also prepares patches for v2.14 since I had them anyway
- keeps using v2.13 for now, someone can test v2.14 later and bump; I've no rk3399
- new patches:
  - add `-no-pie` to rk3399's m0 build LDFLAGS (since upstream doesn't honor M0_LDFLAGS)
  - bump PMSURAM_RSIZE from 8k to 16k to avoid overflows - confirmed working by Amazingfate
- build tested OK on jammy/bookworm/trixie/noble/resolute
  - resolute's gcc 15 and it still builds
2026-01-10 11:13:47 +01:00

27 lines
1.2 KiB
Diff

From a556036ade4d01e8c62963c0c5425b7c3e5f4353 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <ricardo@pardini.net>
Date: Fri, 9 Jan 2026 16:20:52 +0100
Subject: [PATCH 1001/1002] [2.13] rk3399: m0: LDFLAGS `-no-pie`
- since M0_LDFLAGS are not honored anymore
---
plat/rockchip/rk3399/drivers/m0/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plat/rockchip/rk3399/drivers/m0/Makefile b/plat/rockchip/rk3399/drivers/m0/Makefile
index 2bc87ae18..743043858 100644
--- a/plat/rockchip/rk3399/drivers/m0/Makefile
+++ b/plat/rockchip/rk3399/drivers/m0/Makefile
@@ -30,7 +30,7 @@ CFLAGS := -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-common
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
CFLAGS += $(call cc_option, --param=min-pagesize=0)
ASFLAGS := -Wa,--gdwarf-2 -Wa,--fatal-warnings
-LDFLAGS := -Wl,--gc-sections -Wl,--build-id=none -Wl,--fatal-warnings -z noexecstack
+LDFLAGS := -no-pie -Wl,--gc-sections -Wl,--build-id=none -Wl,--fatal-warnings -z noexecstack
LDFLAGS += $(call ld_option,-Xlinker --no-warn-rwx-segments)
# NOTE: The line continuation '\' is required in the next define otherwise we
--
2.52.0