From 49f198c13b403d415af086b1463cdd9f005baa81 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 4 Jan 2018 19:27:39 +0000 Subject: [PATCH] Fix support for riscv 64 bit against new GCC macros. --- gmp-mparam.h | 6 +++++- gmp.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gmp-mparam.h b/gmp-mparam.h index 46b71a9..1d4e087 100644 --- a/gmp-mparam.h +++ b/gmp-mparam.h @@ -75,9 +75,13 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include "gmp-mparam-mipsel.h" #elif defined(__mips) #include "gmp-mparam-mips.h" -#elif defined(__riscv64) +#elif defined(__riscv) +#if __riscv_xlen == 64 #include "gmp-mparam-riscv64.h" #else +#error "No support for riscv32" +#endif +#else #error "The gmp-devel package is not usable with the architecture." #endif diff --git a/gmp.h b/gmp.h index cddc111..0a91606 100644 --- a/gmp.h +++ b/gmp.h @@ -75,9 +75,13 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include "gmp-mipsel.h" #elif defined(__mips) #include "gmp-mips.h" -#elif defined(__riscv64) +#elif defined(__riscv) +#if __riscv_xlen == 64 #include "gmp-riscv64.h" #else +#error "No support for riscv32" +#endif +#else #error "The gmp-devel package is not usable with the architecture." #endif