| ... | @@ -274,7 +274,10 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { | ... | @@ -274,7 +274,10 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { |
| 274 | const linux_prefix = lib_libc_glibc ++ | 274 | const linux_prefix = lib_libc_glibc ++ |
| 275 | "sysdeps" ++ s ++ "unix" ++ s ++ "sysv" ++ s ++ "linux" ++ s; | 275 | "sysdeps" ++ s ++ "unix" ++ s ++ "sysv" ++ s ++ "linux" ++ s; |
| 276 | const Flavor = enum { nonshared, shared }; | 276 | const Flavor = enum { nonshared, shared }; |
| 277 | const Dep = struct { path: []const u8, flavor: Flavor }; | 277 | const Dep = struct { |
| | 278 | path: []const u8, |
| | 279 | flavor: Flavor = .shared, |
| | 280 | }; |
| 278 | const deps = [_]Dep{ | 281 | const deps = [_]Dep{ |
| 279 | .{ | 282 | .{ |
| 280 | .path = lib_libc_glibc ++ "stdlib" ++ s ++ "atexit.c", | 283 | .path = lib_libc_glibc ++ "stdlib" ++ s ++ "atexit.c", |
| ... | @@ -284,46 +287,6 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { | ... | @@ -284,46 +287,6 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { |
| 284 | .path = lib_libc_glibc ++ "stdlib" ++ s ++ "at_quick_exit.c", | 287 | .path = lib_libc_glibc ++ "stdlib" ++ s ++ "at_quick_exit.c", |
| 285 | .flavor = .nonshared, | 288 | .flavor = .nonshared, |
| 286 | }, | 289 | }, |
| 287 | .{ | | |
| 288 | .path = linux_prefix ++ "stat.c", | | |
| 289 | .flavor = .shared, | | |
| 290 | }, | | |
| 291 | .{ | | |
| 292 | .path = linux_prefix ++ "fstat.c", | | |
| 293 | .flavor = .shared, | | |
| 294 | }, | | |
| 295 | .{ | | |
| 296 | .path = linux_prefix ++ "lstat.c", | | |
| 297 | .flavor = .shared, | | |
| 298 | }, | | |
| 299 | .{ | | |
| 300 | .path = linux_prefix ++ "stat64.c", | | |
| 301 | .flavor = .shared, | | |
| 302 | }, | | |
| 303 | .{ | | |
| 304 | .path = linux_prefix ++ "fstat64.c", | | |
| 305 | .flavor = .shared, | | |
| 306 | }, | | |
| 307 | .{ | | |
| 308 | .path = linux_prefix ++ "lstat64.c", | | |
| 309 | .flavor = .shared, | | |
| 310 | }, | | |
| 311 | .{ | | |
| 312 | .path = linux_prefix ++ "fstatat.c", | | |
| 313 | .flavor = .shared, | | |
| 314 | }, | | |
| 315 | .{ | | |
| 316 | .path = linux_prefix ++ "fstatat64.c", | | |
| 317 | .flavor = .shared, | | |
| 318 | }, | | |
| 319 | .{ | | |
| 320 | .path = linux_prefix ++ "mknodat.c", | | |
| 321 | .flavor = .shared, | | |
| 322 | }, | | |
| 323 | .{ | | |
| 324 | .path = lib_libc_glibc ++ "io" ++ s ++ "mknod.c", | | |
| 325 | .flavor = .shared, | | |
| 326 | }, | | |
| 327 | .{ | 290 | .{ |
| 328 | .path = lib_libc_glibc ++ "sysdeps" ++ s ++ "pthread" ++ s ++ "pthread_atfork.c", | 291 | .path = lib_libc_glibc ++ "sysdeps" ++ s ++ "pthread" ++ s ++ "pthread_atfork.c", |
| 329 | .flavor = .nonshared, | 292 | .flavor = .nonshared, |
| ... | @@ -332,10 +295,18 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { | ... | @@ -332,10 +295,18 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { |
| 332 | .path = lib_libc_glibc ++ "debug" ++ s ++ "stack_chk_fail_local.c", | 295 | .path = lib_libc_glibc ++ "debug" ++ s ++ "stack_chk_fail_local.c", |
| 333 | .flavor = .nonshared, | 296 | .flavor = .nonshared, |
| 334 | }, | 297 | }, |
| 335 | .{ | 298 | .{ .path = lib_libc_glibc ++ "csu" ++ s ++ "errno.c" }, |
| 336 | .path = lib_libc_glibc ++ "csu" ++ s ++ "errno.c", | 299 | .{ .path = linux_prefix ++ "stat.c" }, |
| 337 | .flavor = .shared, | 300 | .{ .path = linux_prefix ++ "fstat.c" }, |
| 338 | }, | 301 | .{ .path = linux_prefix ++ "lstat.c" }, |
| | 302 | .{ .path = linux_prefix ++ "stat64.c" }, |
| | 303 | .{ .path = linux_prefix ++ "fstat64.c" }, |
| | 304 | .{ .path = linux_prefix ++ "lstat64.c" }, |
| | 305 | .{ .path = linux_prefix ++ "fstatat.c" }, |
| | 306 | .{ .path = linux_prefix ++ "fstatat64.c" }, |
| | 307 | .{ .path = linux_prefix ++ "mknodat.c" }, |
| | 308 | .{ .path = lib_libc_glibc ++ "io" ++ s ++ "mknod.c" }, |
| | 309 | .{ .path = linux_prefix ++ "stat_t64_cp.c" }, |
| 339 | }; | 310 | }; |
| 340 | | 311 | |
| 341 | var c_source_files: [deps.len]Compilation.CSourceFile = undefined; | 312 | var c_source_files: [deps.len]Compilation.CSourceFile = undefined; |