diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-12-15 15:23:56 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-12-15 15:23:56 -0700 |
| commit | 3dcd3612dca6f649a1e05f558c5d6ed462d2e4a4 (patch) | |
| tree | c2bc2094cb11bfb86190c5b641c784e7caca6190 /src/glibc.zig | |
| parent | 19ca2415f26b07b399a60fd17a4cf85f290da0fd (diff) | |
| download | zig-3dcd3612dca6f649a1e05f558c5d6ed462d2e4a4.tar.gz zig-3dcd3612dca6f649a1e05f558c5d6ed462d2e4a4.zip | |
glibc: use linux-specific files for nonshared
Upstream, some of the nonshared functions moved to be different for hurd
and for linux. Since our glibc is linux-only we update to use the
linux-specific files.
This fixes std lib tests for x86_64 when linking glibc.
Diffstat (limited to 'src/glibc.zig')
| -rw-r--r-- | src/glibc.zig | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/glibc.zig b/src/glibc.zig index b963247984..9426cf48a2 100644 --- a/src/glibc.zig +++ b/src/glibc.zig @@ -269,23 +269,25 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { return comp.build_crt_file("Scrt1", .Obj, &[_]Compilation.CSourceFile{ start_os, abi_note_o }); }, .libc_nonshared_a => { + const s = path.sep_str; + const linux_prefix = lib_libc_glibc ++ + "sysdeps" ++ s ++ "unix" ++ s ++ "sysv" ++ s ++ "linux" ++ s; const deps = [_][]const u8{ - lib_libc_glibc ++ "stdlib" ++ path.sep_str ++ "atexit.c", - lib_libc_glibc ++ "stdlib" ++ path.sep_str ++ "at_quick_exit.c", - lib_libc_glibc ++ "io" ++ path.sep_str ++ "stat.c", - lib_libc_glibc ++ "io" ++ path.sep_str ++ "fstat.c", - lib_libc_glibc ++ "io" ++ path.sep_str ++ "lstat.c", - lib_libc_glibc ++ "io" ++ path.sep_str ++ "stat64.c", - lib_libc_glibc ++ "io" ++ path.sep_str ++ "fstat64.c", - lib_libc_glibc ++ "io" ++ path.sep_str ++ "lstat64.c", - lib_libc_glibc ++ "io" ++ path.sep_str ++ "fstatat.c", - lib_libc_glibc ++ "io" ++ path.sep_str ++ "fstatat64.c", - lib_libc_glibc ++ "io" ++ path.sep_str ++ "mknod.c", - lib_libc_glibc ++ "io" ++ path.sep_str ++ "mknodat.c", - lib_libc_glibc ++ "sysdeps" ++ path.sep_str ++ "pthread" ++ path.sep_str ++ - "pthread_atfork.c", - lib_libc_glibc ++ "debug" ++ path.sep_str ++ "stack_chk_fail_local.c", - lib_libc_glibc ++ "csu" ++ path.sep_str ++ "errno.c", + lib_libc_glibc ++ "stdlib" ++ s ++ "atexit.c", + lib_libc_glibc ++ "stdlib" ++ s ++ "at_quick_exit.c", + linux_prefix ++ "stat.c", + linux_prefix ++ "fstat.c", + linux_prefix ++ "lstat.c", + linux_prefix ++ "stat64.c", + linux_prefix ++ "fstat64.c", + linux_prefix ++ "lstat64.c", + linux_prefix ++ "fstatat.c", + linux_prefix ++ "fstatat64.c", + linux_prefix ++ "mknodat.c", + lib_libc_glibc ++ "io" ++ s ++ "mknod.c", + lib_libc_glibc ++ "sysdeps" ++ s ++ "pthread" ++ s ++ "pthread_atfork.c", + lib_libc_glibc ++ "debug" ++ s ++ "stack_chk_fail_local.c", + lib_libc_glibc ++ "csu" ++ s ++ "errno.c", }; var c_source_files: [deps.len]Compilation.CSourceFile = undefined; |
