core: Add RISC-V architecture detection.
* src/mes.c(mes_environment)[__riscv_xlen == 32]: Set architecture to riscv32. [__riscv_xlen == 64]: Set architecture to riscv64. xlen
This commit is contained in:
parent
5d64961c83
commit
bf5e8b245e
|
@ -1,6 +1,7 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
* Copyright © 2021 W. J. van der Laan <laanwj@protonmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -61,6 +62,10 @@ mes_environment (int argc, char **argv)
|
||||||
arch = "arm";
|
arch = "arm";
|
||||||
#elif __x86_64__
|
#elif __x86_64__
|
||||||
arch = "x86_64";
|
arch = "x86_64";
|
||||||
|
#elif __riscv_xlen == 32
|
||||||
|
arch = "riscv32";
|
||||||
|
#elif __riscv_xlen == 64
|
||||||
|
arch = "riscv64";
|
||||||
#else
|
#else
|
||||||
#error arch not supported
|
#error arch not supported
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue