Skip to content

Commit dc2f4d4

Browse files
t-8chandreas-gaisler
authored andcommitted
sparc: Implement ARCH_HAS_CC_CAN_LINK
The generic CC_CAN_LINK detection does not work for all architectures. 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> Reviewed-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Andreas Larsson <andreas@gaisler.com>
1 parent 8f0b4cc commit dc2f4d4

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

arch/sparc/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ config 64BIT
1313
config SPARC
1414
bool
1515
default y
16+
select ARCH_HAS_CC_CAN_LINK
1617
select ARCH_HAS_CPU_CACHE_ALIASING
1718
select ARCH_HAS_DMA_OPS
1819
select ARCH_MIGHT_HAVE_PC_PARPORT if SPARC64 && PCI
@@ -475,4 +476,14 @@ config COMPAT
475476
select ARCH_WANT_OLD_COMPAT_IPC
476477
select COMPAT_OLD_SIGACTION
477478

479+
config ARCH_CC_CAN_LINK
480+
bool
481+
default $(cc_can_link_user,-m64) if 64BIT
482+
default $(cc_can_link_user,-m32)
483+
484+
config ARCH_USERFLAGS
485+
string
486+
default "-m64" if 64BIT
487+
default "-m32"
488+
478489
source "drivers/sbus/char/Kconfig"

0 commit comments

Comments
 (0)