| ... | ... | @@ -1650,9 +1650,15 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void { |
| 1650 | 1650 | if (self.base.options.libc_installation != null) { |
| 1651 | 1651 | const needs_grouping = self.base.options.link_mode == .Static; |
| 1652 | 1652 | if (needs_grouping) try argv.append("--start-group"); |
| 1653 | | try argv.append("-lm"); |
| 1654 | | try argv.append("-lpthread"); |
| 1655 | | try argv.append("-lc"); |
| 1653 | // This matches the order of glibc.libs |
| 1654 | try argv.appendSlice(&[_][]const u8{ |
| 1655 | "-lm", |
| 1656 | "-lpthread", |
| 1657 | "-lc", |
| 1658 | "-ldl", |
| 1659 | "-lrt", |
| 1660 | "-lutil", |
| 1661 | }); |
| 1656 | 1662 | if (needs_grouping) try argv.append("--end-group"); |
| 1657 | 1663 | } else if (target.isGnuLibC()) { |
| 1658 | 1664 | try argv.append(comp.libunwind_static_lib.?.full_object_path); |