diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-03-12 18:05:27 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-03-12 18:05:27 -0700 |
| commit | 1f34c03ac14ac352ec03267ca8592dadfbd5e4bc (patch) | |
| tree | ebcb851922636b7dd2b17acb72187836c86180ec /src/glibc.zig | |
| parent | 868253a9c94d9907fae81e5e3108c7d10a85f5c3 (diff) | |
| parent | 8ebb18d9da0bfbe6a974636fd36e3391d1de253b (diff) | |
| download | zig-1f34c03ac14ac352ec03267ca8592dadfbd5e4bc.tar.gz zig-1f34c03ac14ac352ec03267ca8592dadfbd5e4bc.zip | |
Merge remote-tracking branch 'origin/master' into llvm12
Diffstat (limited to 'src/glibc.zig')
| -rw-r--r-- | src/glibc.zig | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/glibc.zig b/src/glibc.zig index 96154c1690..a1f02e2f11 100644 --- a/src/glibc.zig +++ b/src/glibc.zig @@ -453,7 +453,20 @@ fn start_asm_path(comp: *Compilation, arena: *Allocator, basename: []const u8) ! } else if (arch.isARM()) { try result.appendSlice("arm"); } else if (arch.isMIPS()) { - try result.appendSlice("mips"); + if (!mem.eql(u8, basename, "crti.S") and !mem.eql(u8, basename, "crtn.S")) { + try result.appendSlice("mips"); + } else { + if (is_64) { + const abi_dir = if (comp.getTarget().abi == .gnuabin32) + "n32" + else + "n64"; + try result.appendSlice("mips" ++ s ++ "mips64" ++ s); + try result.appendSlice(abi_dir); + } else { + try result.appendSlice("mips" ++ s ++ "mips32"); + } + } } else if (arch == .x86_64) { try result.appendSlice("x86_64"); } else if (arch == .i386) { |
