| ... | @@ -335,8 +335,11 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { | ... | @@ -335,8 +335,11 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { |
| 335 | } | 335 | } |
| 336 | | 336 | |
| 337 | const shared_def = switch (dep.flavor) { | 337 | const shared_def = switch (dep.flavor) { |
| 338 | .shared => "-DSHARED", | | |
| 339 | .nonshared => "-DLIBC_NONSHARED=1", | 338 | .nonshared => "-DLIBC_NONSHARED=1", |
| | 339 | // glibc passes `-DSHARED` for these. However, empirically if |
| | 340 | // we do that here we will see undefined symbols such as `__GI_memcpy`. |
| | 341 | // So we pass the same thing as for nonshared. |
| | 342 | .shared => "-DLIBC_NONSHARED=1", |
| 340 | }; | 343 | }; |
| 341 | try args.appendSlice(&[_][]const u8{ | 344 | try args.appendSlice(&[_][]const u8{ |
| 342 | "-D_LIBC_REENTRANT", | 345 | "-D_LIBC_REENTRANT", |