From 5764ffaec2aab678452282cce3f57d6a19cddfb0 Mon Sep 17 00:00:00 2001 From: "riseproject-dev[bot]" <330740410+riseproject-dev[bot]@users.noreply.github.com> Date: Wed, 7 Oct 2026 08:19:02 +0000 Subject: [PATCH 1/2] yggdrasil-engine: Add version 2.0.0 Signed-off-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com> --- docs/packages/yggdrasil-engine.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/yggdrasil-engine.yaml b/docs/packages/yggdrasil-engine.yaml index 02332f78c15..5bca2d08eda 100644 --- a/docs/packages/yggdrasil-engine.yaml +++ b/docs/packages/yggdrasil-engine.yaml @@ -9,3 +9,4 @@ versions: - filename: yggdrasil_engine-1.3.1-cp312-abi3-manylinux_2_39_riscv64.whl sha256: 3dcbd624fa5ebeb43d6c1957397f77652b9fd24a0118e009c7119edf185f4f21 requires-python: '>=3.8,<4.0' +- version: 2.0.0 From 01b1ffb0a98fa57ab8245a502fc0f4c5da925a3c Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 9 Oct 2026 16:32:43 +0000 Subject: [PATCH 2/2] yggdrasil-engine: carry forward riscv64 patches to 2.0.0 Nightly version bump omitted the patches/yggdrasil-engine/ directory for 2.0.0, so the build's unconditional `git apply .../*.patch` step failed with "No such file or directory" before any build/test ran. Copied forward the same patch set from 1.3.1 (unchanged since then). --- ...yggdrasilffi-riscv64-syscall-numbers.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 patches/yggdrasil-engine/2.0.0/0001-yggdrasilffi-riscv64-syscall-numbers.patch diff --git a/patches/yggdrasil-engine/2.0.0/0001-yggdrasilffi-riscv64-syscall-numbers.patch b/patches/yggdrasil-engine/2.0.0/0001-yggdrasilffi-riscv64-syscall-numbers.patch new file mode 100644 index 00000000000..8cad8aea453 --- /dev/null +++ b/patches/yggdrasil-engine/2.0.0/0001-yggdrasilffi-riscv64-syscall-numbers.patch @@ -0,0 +1,47 @@ +From 79a1d5318f08a15066d691f90d263496edd4b227 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Sun, 13 Sep 2026 01:34:34 +0200 +Subject: [PATCH] yggdrasilffi: add riscv64 syscall numbers for gettid/statx + compat shim + +compat_glibc.rs hand-rolls gettid(2)/statx(2) via raw syscall(2) to +avoid depending on the libc crate's own bindings, which would require +a newer glibc than the zigbuild-targeted GLIBC_2.25 floor. It defines +SYS_GETTID/SYS_STATX for x86_64 and aarch64 only; mod compat_glibc is +included unconditionally (no target_arch gate), so on any other arch +- riscv64 included - the crate fails to compile with two +cannot-find-value errors for the two undefined consts. + +riscv64 and aarch64 both use the Linux kernel's generic syscall table +(include/uapi/asm-generic/unistd.h: __NR_gettid 178, __NR_statx 291, +confirmed also in the libc crate's own riscv64 module), unlike x86_64, +which has its own legacy numbering. Add the same two constants under +target_arch = "riscv64". + +Upstream-Status: To upstream [not filed upstream from this porting session, which does not open issues/PRs on repos other than riseproject-dev/python-wheels; genuinely worth upstreaming, it only adds an arch branch matching aarch64's already-supported case] + +Signed-off-by: Ludovic Henry +--- + yggdrasilffi/src/compat_glibc.rs | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/yggdrasilffi/src/compat_glibc.rs b/yggdrasilffi/src/compat_glibc.rs +index c13446d..1a115ac 100644 +--- a/yggdrasilffi/src/compat_glibc.rs ++++ b/yggdrasilffi/src/compat_glibc.rs +@@ -32,6 +32,12 @@ const SYS_GETTID: c_long = 178; + #[cfg(target_arch = "aarch64")] + const SYS_STATX: c_long = 291; + ++// riscv64 syscall numbers (riscv64 shares aarch64's asm-generic/unistd.h table) ++#[cfg(target_arch = "riscv64")] ++const SYS_GETTID: c_long = 178; ++#[cfg(target_arch = "riscv64")] ++const SYS_STATX: c_long = 291; ++ + #[no_mangle] + pub unsafe extern "C" fn gettid() -> pid_t { + syscall(SYS_GETTID) as pid_t +-- +2.50.1 (Apple Git-155) +