[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Add "riscv" as an alias for "riscv32"

From: Palmer Dabbelt
Subject: [PATCH] Add "riscv" as an alias for "riscv32"
Date: Wed, 20 Jun 2018 10:24:41 -0700

Most RISC-V toolchains can generate code for all RISC-V targets, but are
currently named "riscv32-*" and "riscv64-*".  Users have suggested that
these names are unintuiative and would like tuples to be "riscv-*".

This patch enables "riscv-*" tuples by adding a config.sub rule that
replaces "riscv-*" with "riscv32-*".  The first ISA described by the
RISC-V specification is RV32I, a 32-bit ISA, so making "riscv-*" mean
32-bit seems like the sane way to go.  There are also handful of tests
added, which all pass for me.

This has been discussed on various mailing lists a half dozen times, but
I never got around to submitting a patch.

2018-06-11  Palmer Dabbelt  <address@hidden>

        * config.sub: Add "riscv-*" as an alias for "riscv32-*".
        * testsuite/ Add tests for the "riscv-*" alias.

CC: Sebastian Huber <address@hidden>
Signed-off-by: Palmer Dabbelt <address@hidden>
 config.sub                | 6 ++++++
 testsuite/ | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/config.sub b/config.sub
index d1f5b5490349..32be6f6a56db 100755
--- a/config.sub
+++ b/config.sub
@@ -1125,6 +1125,12 @@ case $basic_machine in
+       riscv)
+               basic_machine=riscv32-unknown
+               ;;
+       riscv-*)
+               basic_machine=`echo "$basic_machine" | sed 's/^riscv/riscv32/'`
+               ;;
diff --git a/testsuite/ b/testsuite/
index 8013ead85eb0..79241bdffec4 100644
--- a/testsuite/
+++ b/testsuite/
@@ -412,6 +412,11 @@ pyramid                                            
 rdos32                                         i386-pc-rdos
 rdos64                                         x86_64-pc-rdos
 rdos                                           x86_64-pc-rdos
+riscv-company-elf                              riscv32-company-elf
+riscv-company-hcos                             riscv32-company-hcos
+riscv-elf                                      riscv32-unknown-elf
+riscv-linux                                    riscv32-unknown-linux-gnu
+riscv                                          riscv32-unknown-none
 riscv32-company-elf                            riscv32-company-elf
 riscv32-company-hcos                           riscv32-company-hcos
 riscv32-elf                                    riscv32-unknown-elf

reply via email to

[Prev in Thread] Current Thread [Next in Thread]