From 35accc06ed41d5c1d4f510f60058e47ce51ae033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 9 Oct 2026 09:33:50 +0200 Subject: [PATCH] test: don't claim compatibility for 32-bit RISC-V on 64-bit RISC-V --- test/tests.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/tests.zig b/test/tests.zig index 203c5b37899e45c49d8feb4f64152c5623753c41..baebdd1381629db59e1abf8f371eb643d233a5a2 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -2329,6 +2329,10 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool // avoid reporting compatibility for 32-bit here since we'd just build a bunch of test binaries // that never get run anyway. This added almost an hour's worth of useless work to aarch64-linux // CI, for example. + // + // riscv64-linux and riscv64-netbsd similarly support 32-bit binaries. However, this requires a + // very recent kernel and for the kernel feature to be enabled. Additionally, contemporary + // RISC-V hardware is just too slow to justify building the 32-bit binaries. return switch (host.os.tag) { .illumos => switch (host.cpu.arch) { .x86_64 => arch == .x86, @@ -2338,13 +2342,11 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool .mips64 => arch == .mips, .mips64el => arch == .mipsel, .powerpc64 => arch == .powerpc, - .riscv64 => arch == .riscv32, .sparc64 => arch == .sparc, .x86_64 => arch == .x86, else => false, }, .netbsd => switch (host.cpu.arch) { - .riscv64 => arch == .riscv32, .sparc64 => arch == .sparc, .x86_64 => arch == .x86, else => false, -- 2.54.0