| ... | @@ -840,6 +840,10 @@ pub fn flushModule(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_nod | ... | @@ -840,6 +840,10 @@ pub fn flushModule(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_nod |
| 840 | } else if (target.isGnuLibC()) { | 840 | } else if (target.isGnuLibC()) { |
| 841 | try system_libs.ensureUnusedCapacity(glibc.libs.len + 1); | 841 | try system_libs.ensureUnusedCapacity(glibc.libs.len + 1); |
| 842 | for (glibc.libs) |lib| { | 842 | for (glibc.libs) |lib| { |
| | 843 | if (lib.removed_in) |rem_in| { |
| | 844 | if (target.os.version_range.linux.glibc.order(rem_in) != .lt) continue; |
| | 845 | } |
| | 846 | |
| 843 | const lib_path = try std.fmt.allocPrint(arena, "{s}{c}lib{s}.so.{d}", .{ | 847 | const lib_path = try std.fmt.allocPrint(arena, "{s}{c}lib{s}.so.{d}", .{ |
| 844 | comp.glibc_so_files.?.dir_path, fs.path.sep, lib.name, lib.sover, | 848 | comp.glibc_so_files.?.dir_path, fs.path.sep, lib.name, lib.sover, |
| 845 | }); | 849 | }); |
| ... | @@ -1286,6 +1290,10 @@ fn dumpArgv(self: *Elf, comp: *Compilation) !void { | ... | @@ -1286,6 +1290,10 @@ fn dumpArgv(self: *Elf, comp: *Compilation) !void { |
| 1286 | if (needs_grouping) try argv.append("--end-group"); | 1290 | if (needs_grouping) try argv.append("--end-group"); |
| 1287 | } else if (target.isGnuLibC()) { | 1291 | } else if (target.isGnuLibC()) { |
| 1288 | for (glibc.libs) |lib| { | 1292 | for (glibc.libs) |lib| { |
| | 1293 | if (lib.removed_in) |rem_in| { |
| | 1294 | if (target.os.version_range.linux.glibc.order(rem_in) != .lt) continue; |
| | 1295 | } |
| | 1296 | |
| 1289 | const lib_path = try std.fmt.allocPrint(arena, "{s}{c}lib{s}.so.{d}", .{ | 1297 | const lib_path = try std.fmt.allocPrint(arena, "{s}{c}lib{s}.so.{d}", .{ |
| 1290 | comp.glibc_so_files.?.dir_path, fs.path.sep, lib.name, lib.sover, | 1298 | comp.glibc_so_files.?.dir_path, fs.path.sep, lib.name, lib.sover, |
| 1291 | }); | 1299 | }); |
| ... | @@ -2288,6 +2296,10 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s | ... | @@ -2288,6 +2296,10 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s |
| 2288 | if (needs_grouping) try argv.append("--end-group"); | 2296 | if (needs_grouping) try argv.append("--end-group"); |
| 2289 | } else if (target.isGnuLibC()) { | 2297 | } else if (target.isGnuLibC()) { |
| 2290 | for (glibc.libs) |lib| { | 2298 | for (glibc.libs) |lib| { |
| | 2299 | if (lib.removed_in) |rem_in| { |
| | 2300 | if (target.os.version_range.linux.glibc.order(rem_in) != .lt) continue; |
| | 2301 | } |
| | 2302 | |
| 2291 | const lib_path = try std.fmt.allocPrint(arena, "{s}{c}lib{s}.so.{d}", .{ | 2303 | const lib_path = try std.fmt.allocPrint(arena, "{s}{c}lib{s}.so.{d}", .{ |
| 2292 | comp.glibc_so_files.?.dir_path, fs.path.sep, lib.name, lib.sover, | 2304 | comp.glibc_so_files.?.dir_path, fs.path.sep, lib.name, lib.sover, |
| 2293 | }); | 2305 | }); |