feat(build): rk3399: m0: add support for new binutils versions
c.f. 1f49db5f25cd ("feat(build): add support for new binutils versions")
for the actual reasons. This commit applies the same logic but for the
m0 FW for RK3399 since it uses a different set of flags.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Change-Id: I955b229a7d9d473892f3f3483eaf6e33ffe0e273
diff --git a/plat/rockchip/rk3399/drivers/m0/Makefile b/plat/rockchip/rk3399/drivers/m0/Makefile
index 652ff08..bef387e 100644
--- a/plat/rockchip/rk3399/drivers/m0/Makefile
+++ b/plat/rockchip/rk3399/drivers/m0/Makefile
@@ -35,7 +35,8 @@
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
CFLAGS += $(call cc_option, --param=min-pagesize=0)
ASFLAGS := -Wa,--gdwarf-2
-LDFLAGS := -Wl,--gc-sections -Wl,--build-id=none
+LDFLAGS := -Wl,--gc-sections -Wl,--build-id=none -z noexecstack
+LDFLAGS += $(call ld_option,-Xlinker --no-warn-rwx-segments)
# NOTE: The line continuation '\' is required in the next define otherwise we
# end up with a line-feed characer at the end of the last c filename.