diff options
| author | Koakuma <koachan@protonmail.com> | 2021-04-05 21:22:20 +0700 |
|---|---|---|
| committer | Koakuma <koachan@protonmail.com> | 2021-05-12 14:23:28 +0700 |
| commit | 9c07d30ef5ccfa50c61b51f75c42cf37a09a5863 (patch) | |
| tree | 47fa69324b1d9d79b96a24cca7da0a9c276129e1 /src | |
| parent | 6e5330ee38cb10d4dec85ec36c7a1a0925ead8c9 (diff) | |
| download | zig-9c07d30ef5ccfa50c61b51f75c42cf37a09a5863.tar.gz zig-9c07d30ef5ccfa50c61b51f75c42cf37a09a5863.zip | |
Fix crti/crtn path for SPARC
Diffstat (limited to 'src')
| -rw-r--r-- | src/glibc.zig | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/glibc.zig b/src/glibc.zig index 6b288ac46d..04673e639b 100644 --- a/src/glibc.zig +++ b/src/glibc.zig @@ -446,10 +446,14 @@ fn start_asm_path(comp: *Compilation, arena: *Allocator, basename: []const u8) ! try result.appendSlice(comp.zig_lib_directory.path.?); try result.appendSlice(s ++ "libc" ++ s ++ "glibc" ++ s ++ "sysdeps" ++ s); if (is_sparc) { - if (is_64) { - try result.appendSlice("sparc" ++ s ++ "sparc64"); + if (mem.eql(u8, basename, "crti.S") or mem.eql(u8, basename, "crtn.S")) { + try result.appendSlice("sparc"); } else { - try result.appendSlice("sparc" ++ s ++ "sparc32"); + if (is_64) { + try result.appendSlice("sparc" ++ s ++ "sparc64"); + } else { + try result.appendSlice("sparc" ++ s ++ "sparc32"); + } } } else if (arch.isARM()) { try result.appendSlice("arm"); |
