authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-11 02:00:21+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-11 02:08:18+02:00
log71a237e764717a69495af531ea0d4f123bec7294
treef2cbbab8431b0d34fc764e8b53af87af56641d43
parentddcf6fcdf3452a4a7d55a27e7112e794447120b6
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.zig.system: Force soft_float feature on for MIPS soft float targets.

Workaround for: https://github.com/llvm/llvm-project/issues/135283

1 files changed, 5 insertions(+), 0 deletions(-)

lib/std/zig/system.zig+5
......@@ -411,6 +411,11 @@ pub fn resolveTargetQuery(query: Target.Query) DetectError!Target {
411411 if (result.cpu.arch.isArm() and result.abi.float() == .soft) {
412412 result.cpu.features.removeFeature(@intFromEnum(Target.arm.Feature.vfp2));
413413 }
414
415 // https://github.com/llvm/llvm-project/issues/135283
416 if (result.cpu.arch.isMIPS() and result.abi.float() == .soft) {
417 result.cpu.features.addFeature(@intFromEnum(Target.mips.Feature.soft_float));
418 }
414419 }
415420
416421 // It's possible that we detect the native ABI, but fail to detect the OS version or were told