stage2: Always link -lpthread when using system libc

This is required when cross-compiling glibc targets.
This commit is contained in:
LemonBoy
2021-05-06 19:02:54 +02:00
committed by Isaac Freund
parent 65ee7909b9
commit b288f8c9a6

View File

@@ -1658,9 +1658,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void {
try argv.append("-lm");
}
if (target.os.tag == .freebsd or target.os.tag == .netbsd or target.os.tag == .openbsd) {
try argv.append("-lpthread");
}
try argv.append("-lpthread");
} else if (target.isGnuLibC()) {
try argv.append(comp.libunwind_static_lib.?.full_object_path);
for (glibc.libs) |lib| {