arch/riscv/Toolchain: add riscv32-unknown-elf selection
- user can use menuconfig to select riscv64-unknown-elf or riscv32-unknown-elf Signed-off-by: Zhihong Chen <zhihong.chen@hpmicro.com>
This commit is contained in:
parent
0e018308a3
commit
698f5f3e80
@ -306,15 +306,22 @@ config ARCH_MPU_HAS_NAPOT
|
||||
|
||||
choice
|
||||
prompt "Toolchain Selection"
|
||||
default RISCV_TOOLCHAIN_GNU_RVG
|
||||
default RISCV_TOOLCHAIN_GNU_RV64
|
||||
|
||||
config RISCV_TOOLCHAIN_GNU_RVG
|
||||
bool "Generic GNU RVG toolchain"
|
||||
config RISCV_TOOLCHAIN_GNU_RV64
|
||||
bool "Generic GNU RV64 toolchain"
|
||||
select ARCH_TOOLCHAIN_GNU
|
||||
---help---
|
||||
This option should work for any modern GNU toolchain (GCC 5.2 or newer)
|
||||
configured for riscv64-unknown-elf.
|
||||
|
||||
config RISCV_TOOLCHAIN_GNU_RV32
|
||||
bool "Generic GNU RV32 toolchain"
|
||||
select ARCH_TOOLCHAIN_GNU
|
||||
---help---
|
||||
This option should work for any modern GNU toolchain (GCC 5.2 or newer)
|
||||
configured for riscv32-unknown-elf.
|
||||
|
||||
endchoice
|
||||
|
||||
config RISCV_SEMIHOSTING_HOSTFS
|
||||
|
@ -27,7 +27,9 @@
|
||||
# command-line selection.
|
||||
#
|
||||
|
||||
ifeq ($(filter y, $(CONFIG_RISCV_TOOLCHAIN_GNU_RVG)),y)
|
||||
ifeq ($(filter y, $(CONFIG_RISCV_TOOLCHAIN_GNU_RV64)),y)
|
||||
CONFIG_RISCV_TOOLCHAIN ?= GNU_RVG
|
||||
else ifeq ($(filter y, $(CONFIG_RISCV_TOOLCHAIN_GNU_RV32)),y)
|
||||
CONFIG_RISCV_TOOLCHAIN ?= GNU_RVG
|
||||
endif
|
||||
|
||||
@ -120,7 +122,11 @@ ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVG)
|
||||
|
||||
# Generic GNU RVG toolchain
|
||||
|
||||
ifeq ($(CONFIG_RISCV_TOOLCHAIN_GNU_RV32),y)
|
||||
CROSSDEV ?= riscv32-unknown-elf-
|
||||
else
|
||||
CROSSDEV ?= riscv64-unknown-elf-
|
||||
endif
|
||||
|
||||
# Detect cpu ISA support flags
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user