[PATCH] bsps/riscv: Rename riscv_generic to riscv32_generic and add compiler flags

Hesham Almatary Hesham.Almatary at cl.cam.ac.uk
Mon May 28 09:47:12 UTC 2018


This makes it explicitly 32-bit. Compiler flags are needed if built with
a non riscv32-* toolchain (e.g. riscv64-* with multilib).
---
 bsps/riscv/riscv_generic/config/riscv32_generic.cfg | 7 +++++++
 bsps/riscv/riscv_generic/config/riscv_generic.cfg   | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)
 create mode 100644 bsps/riscv/riscv_generic/config/riscv32_generic.cfg
 delete mode 100644 bsps/riscv/riscv_generic/config/riscv_generic.cfg

diff --git a/bsps/riscv/riscv_generic/config/riscv32_generic.cfg b/bsps/riscv/riscv_generic/config/riscv32_generic.cfg
new file mode 100644
index 0000000..644cadb
--- /dev/null
+++ b/bsps/riscv/riscv_generic/config/riscv32_generic.cfg
@@ -0,0 +1,7 @@
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = riscv
+
+CPU_CFLAGS = -march=rv32imac -mabi=ilp32
+
+CFLAGS_OPTIMIZE_V ?= -Os
diff --git a/bsps/riscv/riscv_generic/config/riscv_generic.cfg b/bsps/riscv/riscv_generic/config/riscv_generic.cfg
deleted file mode 100644
index 785ac42..0000000
--- a/bsps/riscv/riscv_generic/config/riscv_generic.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-include $(RTEMS_ROOT)/make/custom/default.cfg
-
-RTEMS_CPU = riscv
-
-CPU_CFLAGS =
-
-CFLAGS_OPTIMIZE_V ?= -Os
-- 
2.7.4



More information about the devel mailing list