]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390: Implement ARCH_HAS_CC_CAN_LINK
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Mon, 22 Dec 2025 08:28:17 +0000 (09:28 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 23 Dec 2025 10:46:35 +0000 (11:46 +0100)
The generic CC_CAN_LINK detection relies on -m32/-m64 compiler flags.
Some s390 toolchains use -m31 instead but that is not supported in the
kernel.

Make the logic easier to understand and allow the simplification of the
generic CC_CAN_LINK by using a tailored implementation.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/Kconfig

index 0e5fad5f06ca1191081cda8e36bd23bd41ee2840..cd856318ffe5517ba25984c0d7e7e70d92fa386d 100644 (file)
@@ -85,6 +85,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
@@ -294,6 +295,14 @@ config PGTABLE_LEVELS
 
 source "kernel/livepatch/Kconfig"
 
+config ARCH_CC_CAN_LINK
+       bool
+       default $(cc_can_link_user,-m64)
+
+config ARCH_USERFLAGS
+       string
+       default "-m64"
+
 config ARCH_SUPPORTS_KEXEC
        def_bool y