From ff10255d1932381f5b05511b2e1d7c2850762716 Mon Sep 17 00:00:00 2001 From: Zhengyu He Date: Fri, 4 Aug 2023 02:39:10 +0000 Subject: [PATCH] riscv64: Add support for riscv64 This patch add riscv64 build support: 1, ppl.hh and ppl_c.h are added riscv32/riscv64 support 2, increase release number. If we did not fix (1), when we built another package which depends on ppl (like polymake), will meet this issue: bundled extension ppl ... failed ERROR: The bundled extension ppl was explicitly requested but failed to configure. Please recheck your argument (--with-ppl=/usr) and build.riscv64/bundled.log . You can also disable it by specifying --without-ppl instead. error: Bad exit status from /var/tmp/rpm-tmp.* (%build) Reviewed-by: Wei Fu Signed-off-by: Zhengyu He --- ppl.hh | 4 ++++ ppl.spec | 5 ++++- ppl_c.h | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ppl.hh b/ppl.hh index 986586a..1012ed0 100644 --- a/ppl.hh +++ b/ppl.hh @@ -51,6 +51,10 @@ site: http://www.cs.unipr.it/ppl/ . */ #include "ppl-sparc64.hh" #elif defined(__sparc__) #include "ppl-sparc.hh" +#elif defined(__riscv) && (__riscv_xlen == 64) +#include "ppl-riscv64.hh" +#elif defined(__riscv) && (__riscv_xlen == 32) +#include "ppl-riscv32.hh" #else #error "This architecture is not supported by the currently installed ppl-devel packages." #endif diff --git a/ppl.spec b/ppl.spec index d8ea084..d3efadc 100644 --- a/ppl.spec +++ b/ppl.spec @@ -1,6 +1,6 @@ Name: ppl Version: 1.2 -Release: 31%{?dist} +Release: 32%{?dist} Summary: The Parma Polyhedra Library: a library of numerical abstractions License: GPL-3.0-or-later URL: http://www.bugseng.com/ppl @@ -296,6 +296,9 @@ mv \ %endif %changelog +* Wed Feb 28 2024 Zhengyu He - 1.2-32 +- Add support for riscv64 + * Wed Feb 14 2024 Jerry James - 1.2-31 - Rebuild for ppl 9.2.1 - Stop building for 32-bit x86 diff --git a/ppl_c.h b/ppl_c.h index bccbd45..f7064e6 100644 --- a/ppl_c.h +++ b/ppl_c.h @@ -51,6 +51,10 @@ site: http://www.cs.unipr.it/ppl/ . */ #include "ppl_c-sparc64.h" #elif defined(__sparc__) #include "ppl_c-sparc.h" +#elif defined(__riscv) && (__riscv_xlen == 64) +#include "ppl_c-riscv64.h" +#elif defined(__riscv) && (__riscv_xlen == 32) +#include "ppl_c-riscv32.h" #else #error "This architecture is not supported by the currently installed ppl-devel packages." #endif