aboutsummaryrefslogtreecommitdiff
path: root/src/glibc.zig
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2021-05-11 12:43:58 +0200
committerLemonBoy <thatlemon@gmail.com>2021-05-11 12:43:58 +0200
commit2bb8e1ff550ef2b2676e4f7ec3fdaf17aee8d715 (patch)
tree968872435a832f456ba52d54ac51c9b1c5dc0939 /src/glibc.zig
parent780f510ac0137512ad2923835e4ecdb22a81028e (diff)
downloadzig-2bb8e1ff550ef2b2676e4f7ec3fdaf17aee8d715.tar.gz
zig-2bb8e1ff550ef2b2676e4f7ec3fdaf17aee8d715.zip
stage2: Change libc components' linking order
Use the same order as Clang (and, by extension, GCC) for the three most important libc components: lm comes first, followed by lpthread and then lc.
Diffstat (limited to 'src/glibc.zig')
-rw-r--r--src/glibc.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glibc.zig b/src/glibc.zig
index a1f02e2f11..7600f19503 100644
--- a/src/glibc.zig
+++ b/src/glibc.zig
@@ -40,10 +40,11 @@ pub const ABI = struct {
}
};
+// The order of the elements in this array defines the linking order.
pub const libs = [_]Lib{
- .{ .name = "c", .sover = 6 },
.{ .name = "m", .sover = 6 },
.{ .name = "pthread", .sover = 0 },
+ .{ .name = "c", .sover = 6 },
.{ .name = "dl", .sover = 2 },
.{ .name = "rt", .sover = 1 },
.{ .name = "ld", .sover = 2 },