mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
riscv: Implement ARCH_HAS_CC_CAN_LINK
The generic CC_CAN_LINK detection relies on -m32/-m64 compiler flags. These are not supported by riscv compilers. Use architecture-specific logic using -mabi instead. Prefer the 'd' ABI variant when possible as todays toolchains are most likely to provide a libc for that one. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Link: https://patch.msgid.link/20260316-cc-can-link-riscv-v4-1-64c072b456dd@linutronix.de Signed-off-by: Paul Walmsley <pjw@kernel.org>
This commit is contained in:
parent
c0db0690f7
commit
84894ceb3c
|
|
@ -24,6 +24,7 @@ config RISCV
|
|||
select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
|
||||
select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
|
||||
select ARCH_HAS_BINFMT_FLAT
|
||||
select ARCH_HAS_CC_CAN_LINK
|
||||
select ARCH_HAS_CURRENT_STACK_POINTER
|
||||
select ARCH_HAS_DEBUG_VIRTUAL if MMU
|
||||
select ARCH_HAS_DEBUG_VM_PGTABLE
|
||||
|
|
@ -1353,6 +1354,20 @@ config PORTABLE
|
|||
config ARCH_PROC_KCORE_TEXT
|
||||
def_bool y
|
||||
|
||||
config ARCH_CC_CAN_LINK
|
||||
bool
|
||||
default $(cc_can_link_user,-march=rv64g -mabi=lp64d) if 64BIT && FPU
|
||||
default $(cc_can_link_user,-march=rv64g -mabi=lp64) if 64BIT
|
||||
default $(cc_can_link_user,-march=rv32g -mabi=ilp32d) if FPU
|
||||
default $(cc_can_link_user,-march=rv32g -mabi=ilp32)
|
||||
|
||||
config ARCH_USERFLAGS
|
||||
string
|
||||
default "-march=rv64g -mabi=lp64d" if 64BIT && FPU
|
||||
default "-march=rv64g -mabi=lp64" if 64BIT
|
||||
default "-march=rv32g -mabi=ilp32d" if FPU
|
||||
default "-march=rv32g -mabi=ilp32"
|
||||
|
||||
menu "Power management options"
|
||||
|
||||
source "kernel/power/Kconfig"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user