From 46c961203cf786090c53ec71dff910224fb64409 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Sat, 22 Jul 2023 21:53:55 +0200 Subject: [PATCH] elf: account for differences in handling of TLS LD by gcc and clang --- test/elf.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/elf.zig b/test/elf.zig index 5f506e5f..1e839e89 100644 --- a/test/elf.zig +++ b/test/elf.zig @@ -2692,7 +2692,9 @@ fn testTlsLdDso(b: *Build, opts: Options) *Step { \\extern int f0(); \\extern int f1(); \\int main() { - \\ printf("%d %d\n", f0(), f1()); + \\ int x = f0(); + \\ int y = f1(); + \\ printf("%d %d\n", x, y); \\ return 0; \\} ); @@ -2700,7 +2702,7 @@ fn testTlsLdDso(b: *Build, opts: Options) *Step { exe.addPrefixedDirectorySource("-Wl,-rpath,", dso_out.dir); const run = exe.run(); - run.expectStdOutEqual("1 1\n"); + run.expectStdOutEqual("1 2\n"); test_step.dependOn(run.step()); return test_step;