From 5b6c66f1a7bd616f73fee6d3f88ffdacaeac898a Mon Sep 17 00:00:00 2001 From: zhongyao Date: Wed, 3 Sep 2025 15:50:31 +0800 Subject: [PATCH 1/2] Fix cross-compile for riscv64a23 target Signed-off-by: Zhongyao Chen --- jemalloc-sys/build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/jemalloc-sys/build.rs b/jemalloc-sys/build.rs index 3fc5b9fe4..2572f31c8 100644 --- a/jemalloc-sys/build.rs +++ b/jemalloc-sys/build.rs @@ -411,6 +411,7 @@ fn gnu_target(target: &str) -> String { "x86_64-pc-windows-gnu" => "x86_64-w64-mingw32".to_string(), "armv7-linux-androideabi" => "arm-linux-androideabi".to_string(), "riscv64gc-unknown-linux-gnu" => "riscv64-linux-gnu".to_string(), + "riscv64a23-unknown-linux-gnu" => "riscv64-linux-gnu".to_string(), "riscv64gc-unknown-linux-musl" => "riscv64-linux-musl".to_string(), s => s.to_string(), } From 4d83adf18527e2553117a9530bcefff7ed5c3623 Mon Sep 17 00:00:00 2001 From: Zhongyao Chen Date: Wed, 3 Sep 2025 17:52:59 +0800 Subject: [PATCH 2/2] using | to group Signed-off-by: Zhongyao Chen --- jemalloc-sys/build.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jemalloc-sys/build.rs b/jemalloc-sys/build.rs index 2572f31c8..03b6cad5a 100644 --- a/jemalloc-sys/build.rs +++ b/jemalloc-sys/build.rs @@ -410,8 +410,9 @@ fn gnu_target(target: &str) -> String { "i686-pc-windows-gnu" => "i686-w64-mingw32".to_string(), "x86_64-pc-windows-gnu" => "x86_64-w64-mingw32".to_string(), "armv7-linux-androideabi" => "arm-linux-androideabi".to_string(), - "riscv64gc-unknown-linux-gnu" => "riscv64-linux-gnu".to_string(), - "riscv64a23-unknown-linux-gnu" => "riscv64-linux-gnu".to_string(), + "riscv64gc-unknown-linux-gnu" | "riscv64a23-unknown-linux-gnu" => { + "riscv64-linux-gnu".to_string() + } "riscv64gc-unknown-linux-musl" => "riscv64-linux-musl".to_string(), s => s.to_string(), }