nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gn...@apache.org
Subject [incubator-nuttx] 02/06: rv32im/Toolchain.defs: when 'CONFIG_ARCH_FPU' enabled, add 'f' to match and mabi.
Date Tue, 14 Apr 2020 19:02:26 GMT
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 7262af219f481e973e6fec592e8c546ebc6bfefd
Author: zhongan <zhongan@xiaomi.com>
AuthorDate: Wed Mar 18 17:27:22 2020 +0800

    rv32im/Toolchain.defs: when 'CONFIG_ARCH_FPU' enabled, add 'f' to match and mabi.
---
 arch/risc-v/src/rv32im/Toolchain.defs | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/arch/risc-v/src/rv32im/Toolchain.defs b/arch/risc-v/src/rv32im/Toolchain.defs
index c41ffe8..612959a 100644
--- a/arch/risc-v/src/rv32im/Toolchain.defs
+++ b/arch/risc-v/src/rv32im/Toolchain.defs
@@ -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)


Mime
View raw message