| ... | ... | @@ -30,6 +30,12 @@ const exempt_files = [_][]const u8{ |
| 30 | 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 | 39 | pub fn main() !void { |
| 34 | 40 | var arena_instance = std.heap.ArenaAllocator.init(std.heap.page_allocator); |
| 35 | 41 | defer arena_instance.deinit(); |
| ... | ... | @@ -62,6 +68,9 @@ pub fn main() !void { |
| 62 | 68 | for (exempt_files) |p| { |
| 63 | 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 | 75 | glibc_src_dir.copyFile(entry.path, dest_dir.dir, entry.path, .{}) catch |err| { |
| 67 | 76 | log.warn("unable to copy '{s}/{s}' to '{s}/{s}': {s}", .{ |