diff --git a/test/link/elf.zig b/test/link/elf.zig index 280d3f0588..11b249de3e 100644 --- a/test/link/elf.zig +++ b/test/link/elf.zig @@ -1362,6 +1362,11 @@ fn testInitArrayOrder(b: *Build, opts: Options) *Step { exe.addObject(g_o); exe.addObject(h_o); + if (opts.target.isGnuLibC()) { + // TODO I think we need to clarify our use of `-fPIC -fPIE` flags for different targets + exe.pie = true; + } + const run = addRunArtifact(exe); run.expectStdOutEqual("21348756"); test_step.dependOn(&run.step);