rv32im/Toolchain.defs: when 'CONFIG_ARCH_FPU' enabled, add 'f' to match and mabi.

This commit is contained in:
zhongan 2020-03-18 17:27:22 +08:00 committed by Gregory Nutt
parent bf21c1b947
commit 7262af219f
1 changed files with 20 additions and 10 deletions

View File

@ -79,11 +79,16 @@ endif
ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVGL)
CROSSDEV ?= riscv64-unknown-elf-
ARCROSSDEV ?= riscv64-unknown-elf-
ifeq ($(CONFIG_RV32IM_HW_MULDIV),y)
ARCHCPUFLAGS = -march=rv32im -mabi=ilp32f -mdiv
else
ARCHCPUFLAGS = -march=rv32im -mabi=ilp32f -mno-div
endif
ifeq ($(CONFIG_ARCH_FPU),y)
ARCHCPUFLAGS = -march=rv32imf -mabi=ilp32f
else
ARCHCPUFLAGS = -march=rv32im -mabi=ilp32
endif
ifeq ($(CONFIG_RV32IM_HW_MULDIV),y)
ARCHCPUFLAGS += -mdiv
else
ARCHCPUFLAGS += -mno-div
endif
endif
ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVGW)
@ -92,11 +97,16 @@ ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVGW)
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif
ifeq ($(CONFIG_RV32IM_HW_MULDIV),y)
ARCHCPUFLAGS = -march=rv32im -mabi=ilp32f -mdiv
else
ARCHCPUFLAGS = -march=rv32im -mabi=ilp32f -mno-div
endif
ifeq ($(CONFIG_ARCH_FPU),y)
ARCHCPUFLAGS = -march=rv32imf -mabi=ilp32f
else
ARCHCPUFLAGS = -march=rv32im -mabi=ilp32
endif
ifeq ($(CONFIG_RV32IM_HW_MULDIV),y)
ARCHCPUFLAGS += -mdiv
else
ARCHCPUFLAGS += -mno-div
endif
endif
ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RISCY)