| author | |
| committer | |
| log | 1fc56b82ad6f1060ec4b2074c16accfe0327a4b7 |
| tree | 612f85682f05eb5296be5013f6e88769ee8c1215 |
| parent | 0273fbf710f98854f3331c0810cd2f31f20d2fb5 |
Since the stable kernel ABI is through libc #17593 files changed, 7 insertions(+), 13 deletions(-)
src/analyze.cpp+1-1| ... | ... | @@ -6366,7 +6366,7 @@ LinkLib *add_link_lib(CodeGen *g, Buf *name) { |
| 6366 | 6366 | if (is_libc && g->libc_link_lib != nullptr) |
| 6367 | 6367 | return g->libc_link_lib; |
| 6368 | 6368 | |
| 6369 | if (g->enable_cache && is_libc && g->zig_target.os != OsMacOSX && g->zig_target.os != OsIOS) { | |
| 6369 | if (g->enable_cache && is_libc && g->zig_target.os != OsMacOSX && g->zig_target.os != OsIOS && g->zig_target.os != OsFreeBSD) { | |
| 6370 | 6370 | fprintf(stderr, "TODO linking against libc is currently incompatible with `--cache on`.\n" |
| 6371 | 6371 | "Zig is not yet capable of determining whether the libc installation has changed on subsequent builds.\n"); |
| 6372 | 6372 | exit(1); |
src/codegen.cpp+2-1| ... | ... | @@ -178,7 +178,8 @@ CodeGen *codegen_create(Buf *root_src_path, const ZigTarget *target, OutType out |
| 178 | 178 | |
| 179 | 179 | // On Darwin/MacOS/iOS, we always link libSystem which contains libc. |
| 180 | 180 | if (g->zig_target.os == OsMacOSX || |
| 181 | g->zig_target.os == OsIOS) | |
| 181 | g->zig_target.os == OsIOS || | |
| 182 | 	g->zig_target.os == OsFreeBSD) | |
| 182 | 183 | { |
| 183 | 184 | g->libc_link_lib = create_link_lib(buf_create_from_str("c")); |
| 184 | 185 | g->link_libs_list.append(g->libc_link_lib); |
std/special/bootstrap.zig+4-11| ... | ... | @@ -20,17 +20,10 @@ comptime { |
| 20 | 20 | |
| 21 | 21 | nakedcc fn _start() noreturn { |
| 22 | 22 | switch (builtin.arch) { |
| 23 | builtin.Arch.x86_64 => switch (builtin.os) { | |
| 24 | builtin.Os.freebsd => { | |
| 25 | argc_ptr = asm ("lea (%%rdi), %[argc]" | |
| 26 | : [argc] "=r" (-> [*]usize) | |
| 27 | ); | |
| 28 | }, | |
| 29 | else => { | |
| 30 | argc_ptr = asm ("lea (%%rsp), %[argc]" | |
| 31 | : [argc] "=r" (-> [*]usize) | |
| 32 | ); | |
| 33 | }, | |
| 23 | builtin.Arch.x86_64 => { | |
| 24 | argc_ptr = asm ("lea (%%rsp), %[argc]" | |
| 25 | : [argc] "=r" (-> [*]usize) | |
| 26 | ); | |
| 34 | 27 | }, |
| 35 | 28 | builtin.Arch.i386 => { |
| 36 | 29 | argc_ptr = asm ("lea (%%esp), %[argc]" |