From 945f2c855f660cc6cd8823bdcfb767ebafbe6be0 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 b1cb1e2631343e140ade99e61e11dc16c4ff1fe4..e276274b7015085c87fae90b80b9fe889e72b048 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -2356,6 +2356,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, @@ -2365,13 +2369,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