mirror of
https://github.com/ziglang/zig.git
synced 2026-01-28 02:05:31 +00:00
glibc: do not pass -DSHARED to any of the libc_nonshared.a sources
This essentially reverts 6a12dce207114842e2e49a3aeb18af01ab207f0b but it leaves breadcrumbs in the source explaining why things are the way they are.
This commit is contained in:
parent
1b0be5c1ce
commit
9257669cd4
@ -335,8 +335,11 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
|
||||
}
|
||||
|
||||
const shared_def = switch (dep.flavor) {
|
||||
.shared => "-DSHARED",
|
||||
.nonshared => "-DLIBC_NONSHARED=1",
|
||||
// glibc passes `-DSHARED` for these. However, empirically if
|
||||
// we do that here we will see undefined symbols such as `__GI_memcpy`.
|
||||
// So we pass the same thing as for nonshared.
|
||||
.shared => "-DLIBC_NONSHARED=1",
|
||||
};
|
||||
try args.appendSlice(&[_][]const u8{
|
||||
"-D_LIBC_REENTRANT",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user