Recognize riscv32be and riscv64be

Recently RISC-V community got patches big-endian support for binutils,
and we'd like to accept that, however before accepting that I think it
would be better to upstream config.sub and config.guess change here :)

It's my check result on Ubuntu 18.04:

 $ make check
 cd testsuite && bash config-guess.sh && rm uname
 PASS: config.guess checks (131 tests)
 cd testsuite && bash config-sub.sh
 PASS: config.sub checks (830 tests)
 PASS: config.sub idempotency checks (767 tests)
 PASS: config.sub canonicalise each config.guess testcase (131 tests)

* config.guess (riscv32be:Linux:*:*, riscv64be:Linux:*:*): Recognize.
* config.sub (riscv32be, riscv64be): Likewise.
* doc/config.guess.1: Regenerate.
* doc/config.sub.1: Likewise.
* testsuite/config-guess.data: Add test cases for riscv32be, and riscv64be.
* testsuite/config-sub.data (riscv32be, riscv64be): Add test cases.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
This commit is contained in:
Kito Cheng 2020-12-31 15:27:52 +08:00 committed by Dmitry V. Levin
parent c8ddc8472f
commit 8e0c6ffd5c
6 changed files with 19 additions and 6 deletions

4
config.guess vendored
View File

@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2020 Free Software Foundation, Inc.
timestamp='2020-12-22'
timestamp='2020-12-31'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -1087,7 +1087,7 @@ EOF
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-"$LIBC"
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)

4
config.sub vendored
View File

@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2020 Free Software Foundation, Inc.
timestamp='2020-12-22'
timestamp='2020-12-31'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -1230,7 +1230,7 @@ case $cpu-$vendor in
| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
| pru \
| pyramid \
| riscv | riscv32 | riscv64 \
| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
| rl78 | romp | rs6000 | rx \
| s390 | s390x \
| score \

View File

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16.
.TH CONFIG.GUESS "1" "December 2020" "GNU config.guess (2020-12-22)" "User Commands"
.TH CONFIG.GUESS "1" "December 2020" "GNU config.guess (2020-12-31)" "User Commands"
.SH NAME
config.guess \- guess the build system triplet
.SH SYNOPSIS

View File

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16.
.TH CONFIG.SUB "1" "December 2020" "GNU config.sub (2020-12-22)" "User Commands"
.TH CONFIG.SUB "1" "December 2020" "GNU config.sub (2020-12-31)" "User Commands"
.SH NAME
config.sub \- validate and canonicalize a configuration triplet
.SH SYNOPSIS

View File

@ -104,6 +104,8 @@ ppc64le | 3.1.0 | Linux | ignored | ignored | powerpc64le-unknown-linux-gnu
riscv | 1.0 | Twizzler | ignored | ignored | riscv-unknown-twizzler
riscv32 | ignored | Linux | ignored | ignored | riscv32-unknown-linux-gnu
riscv64 | ignored | Linux | ignored | ignored | riscv64-unknown-linux-gnu
riscv32be | ignored | Linux | ignored | ignored | riscv32be-unknown-linux-gnu
riscv64be | ignored | Linux | ignored | ignored | riscv64be-unknown-linux-gnu
s390x | 5.6 | SunOS | ignored | ignored | s390x-ibm-solaris2.6
sun3 | 4.0 | SunOS | ignored | ignored | m68k-sun-sunos4.0
sun4 | 5.6 | SunOS | ignored | ignored | sparc-sun-solaris2.6

View File

@ -588,6 +588,17 @@ riscv64-company-elf riscv64-company-elf
riscv64-elf riscv64-unknown-elf
riscv64-hcos riscv64-unknown-hcos
riscv64-linux riscv64-unknown-linux-gnu
riscv32be riscv32be-unknown-none
riscv32be-company-elf riscv32be-company-elf
riscv32be-company-hcos riscv32be-company-hcos
riscv32be-elf riscv32be-unknown-elf
riscv32be-linux riscv32be-unknown-linux-gnu
riscv64be riscv64be-unknown-none
riscv64be-company-elf riscv64be-company-elf
riscv64be-elf riscv64be-unknown-elf
riscv64be-hcos riscv64be-unknown-hcos
riscv64be-linux riscv64be-unknown-linux-gnu
riscv64be-company-linux riscv64be-company-linux-gnu
rl78 rl78-unknown-none
rl78-linux rl78-unknown-linux-gnu
roadrunner i386-sun-sunos4.0.2