| ... | @@ -30,6 +30,12 @@ const exempt_files = [_][]const u8{ | ... | @@ -30,6 +30,12 @@ const exempt_files = [_][]const u8{ |
| 30 | "sysdeps/pthread/pthread_atfork.c", | 30 | "sysdeps/pthread/pthread_atfork.c", |
| 31 | }; | 31 | }; |
| 32 | | 32 | |
| | 33 | const exempt_extensions = [_][]const u8{ |
| | 34 | // These are the start files we use when targeting glibc <= 2.33. |
| | 35 | "-2.33.S", |
| | 36 | "-2.33.c", |
| | 37 | }; |
| | 38 | |
| 33 | pub fn main() !void { | 39 | pub fn main() !void { |
| 34 | var arena_instance = std.heap.ArenaAllocator.init(std.heap.page_allocator); | 40 | var arena_instance = std.heap.ArenaAllocator.init(std.heap.page_allocator); |
| 35 | defer arena_instance.deinit(); | 41 | defer arena_instance.deinit(); |
| ... | @@ -62,6 +68,9 @@ pub fn main() !void { | ... | @@ -62,6 +68,9 @@ pub fn main() !void { |
| 62 | for (exempt_files) |p| { | 68 | for (exempt_files) |p| { |
| 63 | if (mem.eql(u8, entry.path, p)) continue :walk; | 69 | if (mem.eql(u8, entry.path, p)) continue :walk; |
| 64 | } | 70 | } |
| | 71 | for (exempt_extensions) |ext| { |
| | 72 | if (mem.endsWith(u8, entry.path, ext)) continue :walk; |
| | 73 | } |
| 65 | | 74 | |
| 66 | glibc_src_dir.copyFile(entry.path, dest_dir.dir, entry.path, .{}) catch |err| { | 75 | glibc_src_dir.copyFile(entry.path, dest_dir.dir, entry.path, .{}) catch |err| { |
| 67 | log.warn("unable to copy '{s}/{s}' to '{s}/{s}': {s}", .{ | 76 | log.warn("unable to copy '{s}/{s}' to '{s}/{s}': {s}", .{ |