authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2021-05-06 19:02:54+02:00
committergravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2021-05-11 12:27:24+02:00
logb288f8c9a657b1c5a97e3e543d8598a9e749a390
treea74212653aab1a3a6ad58aec4e7a07a3ba61941e
parent65ee7909b90fc593ffd1f89777ff019e824eafc9

stage2: Always link -lpthread when using system libc

This is required when cross-compiling glibc targets.

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

src/link/Elf.zig+1-3
......@@ -1658,9 +1658,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void {
16581658 try argv.append("-lm");
16591659 }
16601660
1661 if (target.os.tag == .freebsd or target.os.tag == .netbsd or target.os.tag == .openbsd) {
1662 try argv.append("-lpthread");
1663 }
1661 try argv.append("-lpthread");
16641662 } else if (target.isGnuLibC()) {
16651663 try argv.append(comp.libunwind_static_lib.?.full_object_path);
16661664 for (glibc.libs) |lib| {