Files
gentoo/sci-electronics/systemc/files/systemc-2.3.4-riscv-int64.patch
Huang Rui 143a70a529 sci-electronics/systemc: fix build on arm and riscv
The configure script aborted with "architecture not supported" on CPUs
without QuickThreads assembly. Fall back to the portable pthread
coroutine backend there, and fix the int64 typedef that collided with
long on LP64 riscv.

Closes: https://bugs.gentoo.org/926545
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1166
Signed-off-by: Huang Rui <vowstar@gmail.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
2026-06-15 11:43:55 +00:00

17 lines
661 B
Diff

On LP64 RISC-V int64_t is long, which collides with the explicit long
overloads in sc_bit.h. Use long long for sc_dt::int64 there, as later
SystemC releases do unconditionally.
https://bugs.gentoo.org/926545
--- a/src/sysc/datatypes/int/sc_nbdefs.h
+++ b/src/sysc/datatypes/int/sc_nbdefs.h
@@ -177,7 +177,7 @@
// Support for the long long type. This type is not in the standard
// but is usually supported by compilers.
#ifndef _WIN32
-# if defined(__x86_64__) || defined(__aarch64__)
+# if defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
typedef long long int64;
typedef unsigned long long uint64;
# else