]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: 9469/1: Implement ARCH_HAS_CC_CAN_LINK
authorThomas Weissschuh <thomas.weissschuh@linutronix.de>
Tue, 3 Feb 2026 07:11:48 +0000 (08:11 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 6 Feb 2026 13:07:38 +0000 (13:07 +0000)
The generic CC_CAN_LINK detection does not handle different byte orders.
This may lead to userprogs which are not actually runnable on the target
kernel.

Use architecture-specific logic supporting byte orders instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/Kconfig

index fa83c040ee2d402d09442c58bf168e6e476b3680..5ca48361e1a05935f78a94e637cad063f22206ec 100644 (file)
@@ -6,6 +6,7 @@ config ARM
        select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE if HAVE_KRETPROBES && FRAME_POINTER && !ARM_UNWIND
        select ARCH_HAS_BINFMT_FLAT
        select ARCH_HAS_CACHE_LINE_SIZE if OF
+       select ARCH_HAS_CC_CAN_LINK
        select ARCH_HAS_CPU_CACHE_ALIASING
        select ARCH_HAS_CPU_FINALIZE_INIT if MMU
        select ARCH_HAS_CURRENT_STACK_POINTER
@@ -1715,6 +1716,16 @@ config KERNEL_MODE_NEON
 
 endmenu
 
+config ARCH_CC_CAN_LINK
+       bool
+       default $(cc_can_link_user,-mlittle-endian) if CPU_LITTLE_ENDIAN
+       default $(cc_can_link_user,-mbig-endian) if CPU_BIG_ENDIAN
+
+config ARCH_USERFLAGS
+       string
+       default "-mlittle-endian" if CPU_LITTLE_ENDIAN
+       default "-mbig-endian" if CPU_BIG_ENDIAN
+
 menu "Power management options"
 
 source "kernel/power/Kconfig"