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

Hesham Almatary heshamelmatary at gmail.com
Mon May 28 09:54:07 UTC 2018


This should allow building riscv32_generic with riscv64-rtems*
toolchain (or just riscv-rtems*). I tested that.

On Mon, May 28, 2018 at 10:47 AM, Hesham Almatary
<Hesham.Almatary at cl.cam.ac.uk> wrote:
> 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
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



-- 
Hesham



More information about the devel mailing list