[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241016-uml-fix-stub_exe-clang-v1-1-3d6381dc5a78@kernel.org>
Date: Wed, 16 Oct 2024 14:12:37 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Richard Weinberger <richard@....at>,
Anton Ivanov <anton.ivanov@...bridgegreys.com>,
Johannes Berg <johannes@...solutions.net>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>,
Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
Benjamin Berg <benjamin.berg@...el.com>, linux-um@...ts.infradead.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev, patches@...ts.linux.dev,
Nathan Chancellor <nathan@...nel.org>
Subject: [PATCH 1/2] um: Fix passing '-n' to linker for stub_exe
When building stub_exe with clang, there is an error because '-n' is not
a recognized flag by the clang driver (which is being used to invoke the
linker):
clang: error: unknown argument: '-n'
'-n' should be passed along to the linker, as it is the short flag for
'--nmagic', so prefix it with '-Wl,'.
Fixes: 32e8eaf263d9 ("um: use execveat to create userspace MMs")
Signed-off-by: Nathan Chancellor <nathan@...nel.org>
---
arch/um/kernel/skas/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/kernel/skas/Makefile b/arch/um/kernel/skas/Makefile
index fbb61968055f44ac8a963d4c7d250e7c6bbbb321..f93db893b8236cf805edd01b41501d51dd8f0a35 100644
--- a/arch/um/kernel/skas/Makefile
+++ b/arch/um/kernel/skas/Makefile
@@ -27,7 +27,7 @@ quiet_cmd_stub_exe = STUB_EXE $@
$(KBUILD_CFLAGS) $(STUB_EXE_LDFLAGS) \
$(filter %.o,$^)
-STUB_EXE_LDFLAGS = -n -static
+STUB_EXE_LDFLAGS = -Wl,-n -static
targets += stub_exe.dbg stub_exe $(stub_exe_objs-y)
--
2.47.0
Powered by blists - more mailing lists