[PATCH v2 05/10] s390: Implement custom CC_CAN_LINK
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Wed Oct 15 00:05:20 AEDT 2025
The generic CC_CAN_LINK detection relies on -m32/-m64 compiler flags.
s390 uses -m31 instead of -m32.
Use architecture-specific logic using -m31/-m64 instead.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
arch/s390/Kconfig | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index c4145672ca342a656eece10704706d4b12ff9fd6..77ea17537fa2f938aee1fce0053a48853b1ce638 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -82,6 +82,7 @@ config S390
select ARCH_ENABLE_MEMORY_HOTREMOVE
select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
+ select ARCH_HAS_CC_CAN_LINK
select ARCH_HAS_CPU_FINALIZE_INIT
select ARCH_HAS_CURRENT_STACK_POINTER
select ARCH_HAS_DEBUG_VIRTUAL
@@ -290,6 +291,16 @@ config PGTABLE_LEVELS
source "kernel/livepatch/Kconfig"
+config ARCH_CC_CAN_LINK
+ bool
+ default $(cc_can_link_user,-m64) if 64BIT
+ default $(cc_can_link_user,-m31)
+
+config ARCH_USERFLAGS
+ string
+ default "-m64" if 64BIT
+ default "-m31"
+
config ARCH_SUPPORTS_KEXEC
def_bool y
--
2.51.0
More information about the Linuxppc-dev
mailing list