diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 612714f14b80..2c70b7477516 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -518,8 +518,6 @@ config TOOLCHAIN_HAS_V default y depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64iv) depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32iv) - depends on LLD_VERSION >= 140000 || LD_VERSION >= 23800 - depends on AS_HAS_OPTION_ARCH config RISCV_ISA_V bool "VECTOR extension support" diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index f0c0b7781815..ed52650ead8b 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -72,9 +72,8 @@ endif # Check if the toolchain supports Zihintpause extension riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE) := $(riscv-march-y)_zihintpause -# Remove F,D,V from isa string for all. Keep extensions between "fd" and "v" by -# matching non-v and non-multi-letter extensions out with the filter ([^v_]*) -KBUILD_CFLAGS += -march=$(shell echo $(riscv-march-y) | sed -E 's/(rv32ima|rv64ima)fd([^v_]*)v?/\1\2/') +# Remove F,D from isa string for all. +KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y)) KBUILD_AFLAGS += -march=$(riscv-march-y)