[PATCH v2 5/5] riscv: Add new BSP cfg variants to be built with llvm/clang

Hesham Almatary Hesham.Almatary at cl.cam.ac.uk
Thu Oct 24 14:25:39 UTC 2019


---
 bsps/riscv/riscv/config/rv32i_clang.cfg      | 14 ++++++++++++++
 bsps/riscv/riscv/config/rv32iac_clang.cfg    | 14 ++++++++++++++
 bsps/riscv/riscv/config/rv32im_clang.cfg     | 14 ++++++++++++++
 bsps/riscv/riscv/config/rv32imac_clang.cfg   | 14 ++++++++++++++
 bsps/riscv/riscv/config/rv32imafc_clang.cfg  | 14 ++++++++++++++
 bsps/riscv/riscv/config/rv32imafd_clang.cfg  | 14 ++++++++++++++
 bsps/riscv/riscv/config/rv32imafdc_clang.cfg | 14 ++++++++++++++
 bsps/riscv/riscv/config/rv64imafdc_clang.cfg | 14 ++++++++++++++
 8 files changed, 112 insertions(+)
 create mode 100644 bsps/riscv/riscv/config/rv32i_clang.cfg
 create mode 100644 bsps/riscv/riscv/config/rv32iac_clang.cfg
 create mode 100644 bsps/riscv/riscv/config/rv32im_clang.cfg
 create mode 100644 bsps/riscv/riscv/config/rv32imac_clang.cfg
 create mode 100644 bsps/riscv/riscv/config/rv32imafc_clang.cfg
 create mode 100644 bsps/riscv/riscv/config/rv32imafd_clang.cfg
 create mode 100644 bsps/riscv/riscv/config/rv32imafdc_clang.cfg
 create mode 100644 bsps/riscv/riscv/config/rv64imafdc_clang.cfg

diff --git a/bsps/riscv/riscv/config/rv32i_clang.cfg b/bsps/riscv/riscv/config/rv32i_clang.cfg
new file mode 100644
index 0000000000..a7bcedcde5
--- /dev/null
+++ b/bsps/riscv/riscv/config/rv32i_clang.cfg
@@ -0,0 +1,14 @@
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = riscv
+
+CPU_CFLAGS = -march=rv32i -mabi=ilp32
+
+# Clang-related flags
+CPU_CFLAGS += -target riscv32-unknown-rtems6 --sysroot=$(NEWLIB_SYSROOT)
+
+LDFLAGS = -Wl,--gc-sections -L$(RTEMS_BSP_LIBBSP_PATH) -L$(PROJECT_LIB) -L$(RTEMS_BSP_ARCH_LINKCMDS_PATH)
+
+# Clang-related flags
+
+CFLAGS_OPTIMIZE_V ?= -O0 -g -ffunction-sections -fdata-sections
diff --git a/bsps/riscv/riscv/config/rv32iac_clang.cfg b/bsps/riscv/riscv/config/rv32iac_clang.cfg
new file mode 100644
index 0000000000..071fbfd17a
--- /dev/null
+++ b/bsps/riscv/riscv/config/rv32iac_clang.cfg
@@ -0,0 +1,14 @@
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = riscv
+
+CPU_CFLAGS = -march=rv32iac -mabi=ilp32
+
+# Clang-related flags
+CPU_CFLAGS += -target riscv32-unknown-rtems6 --sysroot=$(NEWLIB_SYSROOT)
+
+LDFLAGS = -Wl,--gc-sections -L$(RTEMS_BSP_LIBBSP_PATH) -L$(PROJECT_LIB) -L$(RTEMS_BSP_ARCH_LINKCMDS_PATH)
+
+# Clang-related flags
+
+CFLAGS_OPTIMIZE_V ?= -O0 -g -ffunction-sections -fdata-sections
diff --git a/bsps/riscv/riscv/config/rv32im_clang.cfg b/bsps/riscv/riscv/config/rv32im_clang.cfg
new file mode 100644
index 0000000000..9a2795a2e5
--- /dev/null
+++ b/bsps/riscv/riscv/config/rv32im_clang.cfg
@@ -0,0 +1,14 @@
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = riscv
+
+CPU_CFLAGS = -march=rv32im -mabi=ilp32
+
+# Clang-related flags
+CPU_CFLAGS += -target riscv32-unknown-rtems6 --sysroot=$(NEWLIB_SYSROOT)
+
+LDFLAGS = -Wl,--gc-sections -L$(RTEMS_BSP_LIBBSP_PATH) -L$(PROJECT_LIB) -L$(RTEMS_BSP_ARCH_LINKCMDS_PATH)
+
+# Clang-related flags
+
+CFLAGS_OPTIMIZE_V ?= -O0 -g -ffunction-sections -fdata-sections
diff --git a/bsps/riscv/riscv/config/rv32imac_clang.cfg b/bsps/riscv/riscv/config/rv32imac_clang.cfg
new file mode 100644
index 0000000000..034a200c9b
--- /dev/null
+++ b/bsps/riscv/riscv/config/rv32imac_clang.cfg
@@ -0,0 +1,14 @@
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = riscv
+
+CPU_CFLAGS = -march=rv32imac -mabi=ilp32
+
+# Clang-related flags
+CPU_CFLAGS += -target riscv32-unknown-rtems6 --sysroot=$(NEWLIB_SYSROOT)
+
+LDFLAGS = -Wl,--gc-sections -L$(RTEMS_BSP_LIBBSP_PATH) -L$(PROJECT_LIB) -L$(RTEMS_BSP_ARCH_LINKCMDS_PATH)
+
+# Clang-related flags
+
+CFLAGS_OPTIMIZE_V ?= -O0 -g -ffunction-sections -fdata-sections
diff --git a/bsps/riscv/riscv/config/rv32imafc_clang.cfg b/bsps/riscv/riscv/config/rv32imafc_clang.cfg
new file mode 100644
index 0000000000..3d344ba3db
--- /dev/null
+++ b/bsps/riscv/riscv/config/rv32imafc_clang.cfg
@@ -0,0 +1,14 @@
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = riscv
+
+CPU_CFLAGS = -march=rv32imafc -mabi=ilp32d
+
+# Clang-related flags
+CPU_CFLAGS += -target riscv32-unknown-rtems6 --sysroot=$(NEWLIB_SYSROOT)
+
+LDFLAGS = -Wl,--gc-sections -L$(RTEMS_BSP_LIBBSP_PATH) -L$(PROJECT_LIB) -L$(RTEMS_BSP_ARCH_LINKCMDS_PATH)
+
+# Clang-related flags
+
+CFLAGS_OPTIMIZE_V ?= -O0 -g -ffunction-sections -fdata-sections
diff --git a/bsps/riscv/riscv/config/rv32imafd_clang.cfg b/bsps/riscv/riscv/config/rv32imafd_clang.cfg
new file mode 100644
index 0000000000..887a400117
--- /dev/null
+++ b/bsps/riscv/riscv/config/rv32imafd_clang.cfg
@@ -0,0 +1,14 @@
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = riscv
+
+CPU_CFLAGS = -march=rv32imafd -mabi=ilp32d
+
+# Clang-related flags
+CPU_CFLAGS += -target riscv32-unknown-rtems6 --sysroot=$(NEWLIB_SYSROOT)
+
+LDFLAGS = -Wl,--gc-sections -L$(RTEMS_BSP_LIBBSP_PATH) -L$(PROJECT_LIB) -L$(RTEMS_BSP_ARCH_LINKCMDS_PATH)
+
+# Clang-related flags
+
+CFLAGS_OPTIMIZE_V ?= -O0 -g -ffunction-sections -fdata-sections
diff --git a/bsps/riscv/riscv/config/rv32imafdc_clang.cfg b/bsps/riscv/riscv/config/rv32imafdc_clang.cfg
new file mode 100644
index 0000000000..2d0aa22209
--- /dev/null
+++ b/bsps/riscv/riscv/config/rv32imafdc_clang.cfg
@@ -0,0 +1,14 @@
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = riscv
+
+CPU_CFLAGS = -march=rv32imafdc -mabi=ilp32d
+
+# Clang-related flags
+CPU_CFLAGS += -target riscv32-unknown-rtems6 --sysroot=$(NEWLIB_SYSROOT)
+
+LDFLAGS = -Wl,--gc-sections -L$(RTEMS_BSP_LIBBSP_PATH) -L$(PROJECT_LIB) -L$(RTEMS_BSP_ARCH_LINKCMDS_PATH)
+
+# Clang-related flags
+
+CFLAGS_OPTIMIZE_V ?= -O0 -g -ffunction-sections -fdata-sections
diff --git a/bsps/riscv/riscv/config/rv64imafdc_clang.cfg b/bsps/riscv/riscv/config/rv64imafdc_clang.cfg
new file mode 100644
index 0000000000..ec668bcb18
--- /dev/null
+++ b/bsps/riscv/riscv/config/rv64imafdc_clang.cfg
@@ -0,0 +1,14 @@
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = riscv
+
+CPU_CFLAGS = -march=rv64imafdc -mabi=lp64d
+
+# Clang-related flags
+CPU_CFLAGS += -target riscv64-unknown-rtems6 --sysroot=$(NEWLIB_SYSROOT)
+
+LDFLAGS = -Wl,--gc-sections -L$(RTEMS_BSP_LIBBSP_PATH) -L$(PROJECT_LIB) -L$(RTEMS_BSP_ARCH_LINKCMDS_PATH)
+
+# Clang-related flags
+
+CFLAGS_OPTIMIZE_V ?= -O0 -g -ffunction-sections -fdata-sections
--
2.17.1



More information about the devel mailing list