From 81dd72b2a35d504497265ea18c0d8481bfa4375a Mon Sep 17 00:00:00 2001 From: fossdd Date: Sat, 12 Apr 2025 12:01:30 +0200 Subject: [PATCH] druntime: add support for musl RISCV64 (#21213) Based on https://git.musl-libc.org/cgit/musl/tree/arch/riscv64/bits?h=v1.2.5 --- druntime/src/core/stdc/fenv.d | 5 +++++ druntime/src/core/sys/posix/signal.d | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/druntime/src/core/stdc/fenv.d b/druntime/src/core/stdc/fenv.d index ce77d5c1e6..7d42d5c8c0 100644 --- a/druntime/src/core/stdc/fenv.d +++ b/druntime/src/core/stdc/fenv.d @@ -440,6 +440,11 @@ else version (CRuntime_Musl) } alias uint fexcept_t; } + else version (RICV64) + { + alias uint fenv_t; + alias uint fexcept_t; + } else { static assert(false, "Architecture not supported."); diff --git a/druntime/src/core/sys/posix/signal.d b/druntime/src/core/sys/posix/signal.d index 81fb9d22ac..bdc68687d0 100644 --- a/druntime/src/core/sys/posix/signal.d +++ b/druntime/src/core/sys/posix/signal.d @@ -2763,6 +2763,11 @@ else version (CRuntime_Musl) enum MINSIGSTKSZ = 4096; enum SIGSTKSZ = 16384; } + else version (RISCV64) + { + enum MINSIGSTKSZ = 2048; + enum SIGSTKSZ = 8192; + } else static assert(0, "unimplemented");