From 9889f21f4166bc3f06f8bb25d6fa3149ca24ee9b Mon Sep 17 00:00:00 2001 From: "kevin.allison" Date: Tue, 7 Jul 2026 17:17:30 -0500 Subject: [PATCH] Fix mips rust <--> zig musl target mapping Rust's mips musl target uses the triple `mips-unknown-linux-musl` but zig expects `mips-linux-musleabi`. This adds the mapping for Mips32 targets to use the `Musleabi` environment, similiar to the expecetion for gnu/glibc targets. Rust's mips musl target is soft float (`+mips32r2,+soft-float`). --- src/zig.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zig.rs b/src/zig.rs index ddc1985..8ee6664 100644 --- a/src/zig.rs +++ b/src/zig.rs @@ -1639,6 +1639,7 @@ pub fn prepare_zig_linker( let arch = triple.architecture.to_string(); let target_env = match (triple.architecture, triple.environment) { (Architecture::Mips32(..), Environment::Gnu) => Environment::Gnueabihf, + (Architecture::Mips32(..), Environment::Musl) => Environment::Musleabi, (Architecture::Powerpc, Environment::Gnu) => Environment::Gnueabihf, (_, Environment::GnuLlvm) => Environment::Gnu, (_, environment) => environment,