Commit b288f8c9a6

LemonBoy <thatlemon@gmail.com>
2021-05-06 19:02:54
stage2: Always link -lpthread when using system libc
This is required when cross-compiling glibc targets.
1 parent 65ee790
Changed files (1)
src
link
src/link/Elf.zig
@@ -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| {