Merge pull request #14972 from maribu/riscv-none-elf

build system: use riscv-none-elf as triplet
This commit is contained in:
benpicco 2020-09-24 00:50:46 +02:00 committed by GitHub
commit baedd20e68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -126,6 +126,8 @@ for p in \
arm-none-eabi \ arm-none-eabi \
avr mips-mti-elf \ avr mips-mti-elf \
msp430-elf \ msp430-elf \
riscv-none-elf \
riscv64-unknown-elf \
riscv-none-embed \ riscv-none-embed \
xtensa-esp32-elf \ xtensa-esp32-elf \
xtensa-esp8266-elf \ xtensa-esp8266-elf \
@ -141,6 +143,8 @@ for p in \
arm-none-eabi \ arm-none-eabi \
mips-mti-elf \ mips-mti-elf \
msp430-elf \ msp430-elf \
riscv-none-elf \
riscv64-unknown-elf \
riscv-none-embed \ riscv-none-embed \
xtensa-esp32-elf \ xtensa-esp32-elf \
xtensa-esp8266-elf \ xtensa-esp8266-elf \

View File

@ -1,5 +1,19 @@
# Target architecture for the build. # Target architecture for the build.
TARGET_ARCH_RISCV ?= riscv-none-embed TARGET_ARCH_RISCV ?= riscv-none-elf
# If TARGET_ARCH wasn't set by user, also check if riscv64-unknown-elf
# or riscv-none-embed is present.
ifeq (riscv-none-elf,$(TARGET_ARCH_RISCV))
ifeq (,$(shell which $(TARGET_ARCH_RISCV)-gcc))
ifneq (,$(shell which riscv64-unknown-elf-gcc))
TARGET_ARCH_RISCV := riscv64-unknown-elf
else ifneq (,$(shell which riscv-none-embed-gcc))
$(info Falling back to legacy riscv-none-embed toolchain)
TARGET_ARCH_RISCV := riscv-none-embed
endif
endif
endif
TARGET_ARCH ?= $(TARGET_ARCH_RISCV) TARGET_ARCH ?= $(TARGET_ARCH_RISCV)
# define build specific options # define build specific options