authorgravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2021-04-05 21:22:20+07:00
committergravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2021-05-12 14:23:28+07:00
log9c07d30ef5ccfa50c61b51f75c42cf37a09a5863
tree47fa69324b1d9d79b96a24cca7da0a9c276129e1
parent6e5330ee38cb10d4dec85ec36c7a1a0925ead8c9

Fix crti/crtn path for SPARC


1 files changed, 7 insertions(+), 3 deletions(-)

src/glibc.zig+7-3
...@@ -446,10 +446,14 @@ fn start_asm_path(comp: *Compilation, arena: *Allocator, basename: []const u8) !...@@ -446,10 +446,14 @@ fn start_asm_path(comp: *Compilation, arena: *Allocator, basename: []const u8) !
446 try result.appendSlice(comp.zig_lib_directory.path.?);446 try result.appendSlice(comp.zig_lib_directory.path.?);
447 try result.appendSlice(s ++ "libc" ++ s ++ "glibc" ++ s ++ "sysdeps" ++ s);447 try result.appendSlice(s ++ "libc" ++ s ++ "glibc" ++ s ++ "sysdeps" ++ s);
448 if (is_sparc) {448 if (is_sparc) {
449 if (is_64) {449 if (mem.eql(u8, basename, "crti.S") or mem.eql(u8, basename, "crtn.S")) {
450 try result.appendSlice("sparc" ++ s ++ "sparc64");450 try result.appendSlice("sparc");
451 } else {451 } else {
452 try result.appendSlice("sparc" ++ s ++ "sparc32");452 if (is_64) {
453 try result.appendSlice("sparc" ++ s ++ "sparc64");
454 } else {
455 try result.appendSlice("sparc" ++ s ++ "sparc32");
456 }
453 }457 }
454 } else if (arch.isARM()) {458 } else if (arch.isARM()) {
455 try result.appendSlice("arm");459 try result.appendSlice("arm");