You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/04/14 18:53:22 UTC

[incubator-nuttx] 02/06: rv32im/Toolchain.defs: when 'CONFIG_ARCH_FPU' enabled, add 'f' to match and mabi.

This is an automated email from the ASF dual-hosted git repository.

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

commit b31db969e646f73a2b138b3809b79f200cb3c5ea
Author: zhongan <zh...@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.
    
    Change-Id: Iab7deb36977222a06eba2a59da3b4ed77eb52284
    Signed-off-by: zhongan <zh...@xiaomi.com>
---
 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)