Thread (25 messages) 25 messages, 4 authors, 2026-02-20
STALE119d

[PATCH v2 09/10] sparc: Implement custom CC_CAN_LINK

From: Thomas Weißschuh <hidden>
Date: 2025-10-14 13:05:56
Also in: linux-kbuild, linux-mips, linux-riscv, linux-s390, lkml, sparclinux
Subsystem: sparc + ultrasparc (sparc/sparc64), the rest · Maintainers: "David S. Miller", Andreas Larsson, Linus Torvalds

The generic CC_CAN_LINK detection does not work for all architectures.
To make it clearer how the detection works on SPARC create an
architecture-specific variant.

Signed-off-by: Thomas Weißschuh <redacted>
---
 arch/sparc/Kconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index a630d373e6453c745ab8bf58fc5622cf0edaf4c9..68b553a47d039da4368a2de30168aaf80a941148 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -13,6 +13,7 @@ config 64BIT
 config SPARC
 	bool
 	default y
+	select ARCH_HAS_CC_CAN_LINK
 	select ARCH_HAS_CPU_CACHE_ALIASING
 	select ARCH_HAS_DMA_OPS
 	select ARCH_MIGHT_HAVE_PC_PARPORT if SPARC64 && PCI
@@ -475,4 +476,14 @@ config COMPAT
 	select ARCH_WANT_OLD_COMPAT_IPC
 	select COMPAT_OLD_SIGACTION
 
+config ARCH_CC_CAN_LINK
+	bool
+	default $(cc_can_link_user,-m64) if 64BIT
+	default $(cc_can_link_user,-m32)
+
+config ARCH_USERFLAGS
+	string
+	default "-m64" if 64BIT
+	default "-m32"
+
 source "drivers/sbus/char/Kconfig"
-- 
2.51.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help