From 903cc5444dcc688af21d665dae77f573d7a8e44e Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 14 Feb 2023 15:09:31 -0500 Subject: [PATCH] Makefile: Link with -z noexectack When moving to gcc-12.2 we started trying to quiet some of the new linker warnings, that are not relevant to us. However, a misunderstanding of the mechanics at play meant that I intentionally omitted passing -z noexecstack to the linker, when we do need to. Add this flag and in turn remove warnings from the linker. Fixes: e30a33becdef ("Makefile: link with --no-warn-rwx-segments") Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 54f894dab8..bc1ee94fb7 100644 --- a/Makefile +++ b/Makefile @@ -806,6 +806,7 @@ KBUILD_CPPFLAGS += $(KCPPFLAGS) KBUILD_AFLAGS += $(KAFLAGS) KBUILD_CFLAGS += $(KCFLAGS) +KBUILD_LDFLAGS += -z noexecstack KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments) KBUILD_HOSTCFLAGS += $(if $(CONFIG_TOOLS_DEBUG),-g) -- 2.39.5