configure: Recognize RISC-V architectures.

* configure (main): Classify "riscv64" as 64 bit, allow "redhat" OS
(somewhat tangential, but important for Fedora RISC-V), allow
"riscv32-linux-mes" and "riscv64-linux-mes" as system.
This commit is contained in:
W. J. van der Laan 2021-04-04 07:10:55 +00:00 committed by Janneke Nieuwenhuizen
parent edf397038a
commit 5d64961c83

9
configure vendored
View file

@ -6,6 +6,7 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
;;; GNU Mes --- Maxwell Equations of Software
;;; Copyright © 2016,2017,2018,2019,2020,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Vagrant Cascadian <vagrant@reproducible-builds.org>
;;; Copyright © 2021 W. J. van der Laan <laanwj@protonmail.com>
;;;
;;; configure: This file is part of GNU Mes.
;;;
@ -538,12 +539,12 @@ Some influential environment variables:
(mes-cpu (cond ((member mes-cpu '("i386" "i486" "i586" "i686")) "x86")
((member mes-cpu '("arm" "armv4" "armv7l")) "arm")
(else mes-cpu)))
(mes-bits (if (member mes-cpu '("x86_64")) "64"
(mes-bits (if (member mes-cpu '("x86_64" "riscv64")) "64"
"32"))
(mes-libc (if system-libc? "system" "mes"))
(mes-kernel (car (filter
(compose not
(cut member <> '("pc" "portbld" "unknown")))
(cut member <> '("pc" "portbld" "unknown" "redhat")))
(cdr host-type-list))))
(mes-kernel (if (string-prefix? "freebsd" mes-kernel) "freebsd" mes-kernel))
(mes-compiler (cond (gcc? "gcc") (tcc? "gcc") (mescc? "mescc") (else "bootstrap")))
@ -574,7 +575,9 @@ Some influential environment variables:
(when (and (not (member mes-system '("arm-linux-mes"
"x86-linux-mes"
"x86_64-linux-mes")))
"x86_64-linux-mes"
"riscv32-linux-mes"
"riscv64-linux-mes")))
(not with-courage?))
(stderr "platform not supported: ~a
See \"Porting GNU Mes\" in the manual, or try --with-courage\n" mes-system)