]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sparc: Disable compat support with LLD
authorRosen Penev <rosenp@gmail.com>
Fri, 8 May 2026 00:08:34 +0000 (17:08 -0700)
committerAndreas Larsson <andreas@gaisler.com>
Mon, 15 Jun 2026 08:05:11 +0000 (10:05 +0200)
An LLVM=1 sparc64 allmodconfig enables COMPAT and then tries to
build the 32-bit vDSO. That path cannot be linked with ld.lld:

  ld.lld: error: unknown emulation: elf32_sparc

ld.lld does not support the 32-bit SPARC ELF emulation used for
the compat vDSO, so keep COMPAT disabled when LLD is the linker.
This avoids selecting an unsupported build path while leaving the
existing GNU ld configuration unchanged.

Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/20260508000834.834824-1-rosenp@gmail.com
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
arch/sparc/Kconfig

index fb53b21a869659de2ee86d6e54f95d70d0e46bcb..c3d72b433bcd3755752eb713371d1bed5ea0adaf 100644 (file)
@@ -450,6 +450,7 @@ endmenu
 config COMPAT
        bool
        depends on SPARC64
+       depends on !LD_IS_LLD
        default y
        select HAVE_UID16
        select ARCH_WANT_OLD_COMPAT_IPC