mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 00:35:10 +00:00
mips: implement Target.getStandardDynamicLinkerPath
This commit is contained in:
parent
34d2700af4
commit
7927764cc2
@ -1151,7 +1151,16 @@ pub const Target = struct {
|
||||
.mipsel,
|
||||
.mips64,
|
||||
.mips64el,
|
||||
=> return error.UnknownDynamicLinkerPath,
|
||||
=> {
|
||||
const lib_suffix = switch (self.abi) {
|
||||
.gnuabin32, .gnux32 => "32",
|
||||
.gnuabi64 => "64",
|
||||
else => "",
|
||||
};
|
||||
const is_nan_2008 = mips.featureSetHas(self.cpu.features, .nan2008);
|
||||
const loader = if (is_nan_2008) "ld-linux-mipsn8.so.1" else "ld.so.1";
|
||||
return std.fmt.allocPrint0(a, "/lib{}/{}", .{ lib_suffix, loader });
|
||||
},
|
||||
|
||||
.powerpc => return mem.dupeZ(a, u8, "/lib/ld.so.1"),
|
||||
.powerpc64, .powerpc64le => return mem.dupeZ(a, u8, "/lib64/ld64.so.2"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user