| ... | @@ -185,6 +185,8 @@ fn testAsNeeded(b: *Build, opts: Options) *Step { | ... | @@ -185,6 +185,8 @@ fn testAsNeeded(b: *Build, opts: Options) *Step { |
| 185 | exe.addLibraryPath(libbaz.getEmittedBinDirectory()); | 185 | exe.addLibraryPath(libbaz.getEmittedBinDirectory()); |
| 186 | exe.addRPath(libbaz.getEmittedBinDirectory()); | 186 | exe.addRPath(libbaz.getEmittedBinDirectory()); |
| 187 | exe.linkLibC(); | 187 | exe.linkLibC(); |
| | 188 | // https://github.com/ziglang/zig/issues/17619 |
| | 189 | exe.pie = true; |
| 188 | | 190 | |
| 189 | const run = addRunArtifact(exe); | 191 | const run = addRunArtifact(exe); |
| 190 | run.expectStdOutEqual("42\n"); | 192 | run.expectStdOutEqual("42\n"); |
| ... | @@ -211,6 +213,8 @@ fn testAsNeeded(b: *Build, opts: Options) *Step { | ... | @@ -211,6 +213,8 @@ fn testAsNeeded(b: *Build, opts: Options) *Step { |
| 211 | exe.addLibraryPath(libbaz.getEmittedBinDirectory()); | 213 | exe.addLibraryPath(libbaz.getEmittedBinDirectory()); |
| 212 | exe.addRPath(libbaz.getEmittedBinDirectory()); | 214 | exe.addRPath(libbaz.getEmittedBinDirectory()); |
| 213 | exe.linkLibC(); | 215 | exe.linkLibC(); |
| | 216 | // https://github.com/ziglang/zig/issues/17619 |
| | 217 | exe.pie = true; |
| 214 | | 218 | |
| 215 | const run = addRunArtifact(exe); | 219 | const run = addRunArtifact(exe); |
| 216 | run.expectStdOutEqual("42\n"); | 220 | run.expectStdOutEqual("42\n"); |
| ... | @@ -396,6 +400,8 @@ fn testCopyrel(b: *Build, opts: Options) *Step { | ... | @@ -396,6 +400,8 @@ fn testCopyrel(b: *Build, opts: Options) *Step { |
| 396 | , &.{}); | 400 | , &.{}); |
| 397 | exe.linkLibrary(dso); | 401 | exe.linkLibrary(dso); |
| 398 | exe.linkLibC(); | 402 | exe.linkLibC(); |
| | 403 | // https://github.com/ziglang/zig/issues/17619 |
| | 404 | exe.pie = true; |
| 399 | | 405 | |
| 400 | const run = addRunArtifact(exe); | 406 | const run = addRunArtifact(exe); |
| 401 | run.expectStdOutEqual("3 5\n"); | 407 | run.expectStdOutEqual("3 5\n"); |
| ... | @@ -556,6 +562,8 @@ fn testDsoPlt(b: *Build, opts: Options) *Step { | ... | @@ -556,6 +562,8 @@ fn testDsoPlt(b: *Build, opts: Options) *Step { |
| 556 | , &.{}); | 562 | , &.{}); |
| 557 | exe.linkLibrary(dso); | 563 | exe.linkLibrary(dso); |
| 558 | exe.linkLibC(); | 564 | exe.linkLibC(); |
| | 565 | // https://github.com/ziglang/zig/issues/17619 |
| | 566 | exe.pie = true; |
| 559 | | 567 | |
| 560 | const run = addRunArtifact(exe); | 568 | const run = addRunArtifact(exe); |
| 561 | run.expectStdOutEqual("Hello WORLD\n"); | 569 | run.expectStdOutEqual("Hello WORLD\n"); |
| ... | @@ -591,6 +599,8 @@ fn testDsoUndef(b: *Build, opts: Options) *Step { | ... | @@ -591,6 +599,8 @@ fn testDsoUndef(b: *Build, opts: Options) *Step { |
| 591 | \\} | 599 | \\} |
| 592 | , &.{}); | 600 | , &.{}); |
| 593 | exe.linkLibC(); | 601 | exe.linkLibC(); |
| | 602 | // https://github.com/ziglang/zig/issues/17619 |
| | 603 | exe.pie = true; |
| 594 | | 604 | |
| 595 | const run = addRunArtifact(exe); | 605 | const run = addRunArtifact(exe); |
| 596 | run.expectExitCode(0); | 606 | run.expectExitCode(0); |
| ... | @@ -896,6 +906,8 @@ fn testIFuncAlias(b: *Build, opts: Options) *Step { | ... | @@ -896,6 +906,8 @@ fn testIFuncAlias(b: *Build, opts: Options) *Step { |
| 896 | , &.{}); | 906 | , &.{}); |
| 897 | exe.force_pic = true; | 907 | exe.force_pic = true; |
| 898 | exe.linkLibC(); | 908 | exe.linkLibC(); |
| | 909 | // https://github.com/ziglang/zig/issues/17619 |
| | 910 | exe.pie = true; |
| 899 | | 911 | |
| 900 | const run = addRunArtifact(exe); | 912 | const run = addRunArtifact(exe); |
| 901 | run.expectExitCode(0); | 913 | run.expectExitCode(0); |
| ... | @@ -1006,6 +1018,8 @@ fn testIFuncDynamic(b: *Build, opts: Options) *Step { | ... | @@ -1006,6 +1018,8 @@ fn testIFuncDynamic(b: *Build, opts: Options) *Step { |
| 1006 | addCSourceBytes(exe, main_c, &.{}); | 1018 | addCSourceBytes(exe, main_c, &.{}); |
| 1007 | exe.linkLibC(); | 1019 | exe.linkLibC(); |
| 1008 | exe.link_z_lazy = true; | 1020 | exe.link_z_lazy = true; |
| | 1021 | // https://github.com/ziglang/zig/issues/17619 |
| | 1022 | exe.pie = true; |
| 1009 | | 1023 | |
| 1010 | const run = addRunArtifact(exe); | 1024 | const run = addRunArtifact(exe); |
| 1011 | run.expectStdOutEqual("Hello world\n"); | 1025 | run.expectStdOutEqual("Hello world\n"); |
| ... | @@ -1015,6 +1029,8 @@ fn testIFuncDynamic(b: *Build, opts: Options) *Step { | ... | @@ -1015,6 +1029,8 @@ fn testIFuncDynamic(b: *Build, opts: Options) *Step { |
| 1015 | const exe = addExecutable(b, "other", opts); | 1029 | const exe = addExecutable(b, "other", opts); |
| 1016 | addCSourceBytes(exe, main_c, &.{}); | 1030 | addCSourceBytes(exe, main_c, &.{}); |
| 1017 | exe.linkLibC(); | 1031 | exe.linkLibC(); |
| | 1032 | // https://github.com/ziglang/zig/issues/17619 |
| | 1033 | exe.pie = true; |
| 1018 | | 1034 | |
| 1019 | const run = addRunArtifact(exe); | 1035 | const run = addRunArtifact(exe); |
| 1020 | run.expectStdOutEqual("Hello world\n"); | 1036 | run.expectStdOutEqual("Hello world\n"); |
| ... | @@ -1078,6 +1094,8 @@ fn testIFuncFuncPtr(b: *Build, opts: Options) *Step { | ... | @@ -1078,6 +1094,8 @@ fn testIFuncFuncPtr(b: *Build, opts: Options) *Step { |
| 1078 | , &.{}); | 1094 | , &.{}); |
| 1079 | exe.force_pic = true; | 1095 | exe.force_pic = true; |
| 1080 | exe.linkLibC(); | 1096 | exe.linkLibC(); |
| | 1097 | // https://github.com/ziglang/zig/issues/17619 |
| | 1098 | exe.pie = true; |
| 1081 | | 1099 | |
| 1082 | const run = addRunArtifact(exe); | 1100 | const run = addRunArtifact(exe); |
| 1083 | run.expectStdOutEqual("3\n"); | 1101 | run.expectStdOutEqual("3\n"); |
| ... | @@ -1107,6 +1125,8 @@ fn testIFuncNoPlt(b: *Build, opts: Options) *Step { | ... | @@ -1107,6 +1125,8 @@ fn testIFuncNoPlt(b: *Build, opts: Options) *Step { |
| 1107 | , &.{"-fno-plt"}); | 1125 | , &.{"-fno-plt"}); |
| 1108 | exe.force_pic = true; | 1126 | exe.force_pic = true; |
| 1109 | exe.linkLibC(); | 1127 | exe.linkLibC(); |
| | 1128 | // https://github.com/ziglang/zig/issues/17619 |
| | 1129 | exe.pie = true; |
| 1110 | | 1130 | |
| 1111 | const run = addRunArtifact(exe); | 1131 | const run = addRunArtifact(exe); |
| 1112 | run.expectStdOutEqual("Hello world\n"); | 1132 | run.expectStdOutEqual("Hello world\n"); |
| ... | @@ -1413,6 +1433,8 @@ fn testLargeAlignmentDso(b: *Build, opts: Options) *Step { | ... | @@ -1413,6 +1433,8 @@ fn testLargeAlignmentDso(b: *Build, opts: Options) *Step { |
| 1413 | , &.{}); | 1433 | , &.{}); |
| 1414 | exe.linkLibrary(dso); | 1434 | exe.linkLibrary(dso); |
| 1415 | exe.linkLibC(); | 1435 | exe.linkLibC(); |
| | 1436 | // https://github.com/ziglang/zig/issues/17619 |
| | 1437 | exe.pie = true; |
| 1416 | | 1438 | |
| 1417 | const run = addRunArtifact(exe); | 1439 | const run = addRunArtifact(exe); |
| 1418 | run.expectStdOutEqual("Hello world"); | 1440 | run.expectStdOutEqual("Hello world"); |
| ... | @@ -1447,6 +1469,8 @@ fn testLargeAlignmentExe(b: *Build, opts: Options) *Step { | ... | @@ -1447,6 +1469,8 @@ fn testLargeAlignmentExe(b: *Build, opts: Options) *Step { |
| 1447 | , &.{}); | 1469 | , &.{}); |
| 1448 | exe.link_function_sections = true; | 1470 | exe.link_function_sections = true; |
| 1449 | exe.linkLibC(); | 1471 | exe.linkLibC(); |
| | 1472 | // https://github.com/ziglang/zig/issues/17619 |
| | 1473 | exe.pie = true; |
| 1450 | | 1474 | |
| 1451 | const check = exe.checkObject(); | 1475 | const check = exe.checkObject(); |
| 1452 | check.checkInSymtab(); | 1476 | check.checkInSymtab(); |
| ... | @@ -1475,6 +1499,8 @@ fn testLargeBss(b: *Build, opts: Options) *Step { | ... | @@ -1475,6 +1499,8 @@ fn testLargeBss(b: *Build, opts: Options) *Step { |
| 1475 | \\} | 1499 | \\} |
| 1476 | , &.{}); | 1500 | , &.{}); |
| 1477 | exe.linkLibC(); | 1501 | exe.linkLibC(); |
| | 1502 | // https://github.com/ziglang/zig/issues/17619 |
| | 1503 | exe.pie = true; |
| 1478 | | 1504 | |
| 1479 | const run = addRunArtifact(exe); | 1505 | const run = addRunArtifact(exe); |
| 1480 | run.expectExitCode(0); | 1506 | run.expectExitCode(0); |
| ... | @@ -1698,6 +1724,8 @@ fn testPltGot(b: *Build, opts: Options) *Step { | ... | @@ -1698,6 +1724,8 @@ fn testPltGot(b: *Build, opts: Options) *Step { |
| 1698 | exe.linkLibrary(dso); | 1724 | exe.linkLibrary(dso); |
| 1699 | exe.force_pic = true; | 1725 | exe.force_pic = true; |
| 1700 | exe.linkLibC(); | 1726 | exe.linkLibC(); |
| | 1727 | // https://github.com/ziglang/zig/issues/17619 |
| | 1728 | exe.pie = true; |
| 1701 | | 1729 | |
| 1702 | const run = addRunArtifact(exe); | 1730 | const run = addRunArtifact(exe); |
| 1703 | run.expectStdOutEqual("Hello world\n"); | 1731 | run.expectStdOutEqual("Hello world\n"); |
| ... | @@ -1912,6 +1940,8 @@ fn testTlsDso(b: *Build, opts: Options) *Step { | ... | @@ -1912,6 +1940,8 @@ fn testTlsDso(b: *Build, opts: Options) *Step { |
| 1912 | , &.{}); | 1940 | , &.{}); |
| 1913 | exe.linkLibrary(dso); | 1941 | exe.linkLibrary(dso); |
| 1914 | exe.linkLibC(); | 1942 | exe.linkLibC(); |
| | 1943 | // https://github.com/ziglang/zig/issues/17619 |
| | 1944 | exe.pie = true; |
| 1915 | | 1945 | |
| 1916 | const run = addRunArtifact(exe); | 1946 | const run = addRunArtifact(exe); |
| 1917 | run.expectStdOutEqual("5 3 5 3 5 3\n"); | 1947 | run.expectStdOutEqual("5 3 5 3 5 3\n"); |
| ... | @@ -2061,6 +2091,8 @@ fn testTlsGdNoPlt(b: *Build, opts: Options) *Step { | ... | @@ -2061,6 +2091,8 @@ fn testTlsGdNoPlt(b: *Build, opts: Options) *Step { |
| 2061 | exe.linkLibrary(a_so); | 2091 | exe.linkLibrary(a_so); |
| 2062 | exe.linkLibrary(b_so); | 2092 | exe.linkLibrary(b_so); |
| 2063 | exe.linkLibC(); | 2093 | exe.linkLibC(); |
| | 2094 | // https://github.com/ziglang/zig/issues/17619 |
| | 2095 | exe.pie = true; |
| 2064 | | 2096 | |
| 2065 | const run = addRunArtifact(exe); | 2097 | const run = addRunArtifact(exe); |
| 2066 | run.expectStdOutEqual("1 2 3 4 5 6\n"); | 2098 | run.expectStdOutEqual("1 2 3 4 5 6\n"); |
| ... | @@ -2074,6 +2106,8 @@ fn testTlsGdNoPlt(b: *Build, opts: Options) *Step { | ... | @@ -2074,6 +2106,8 @@ fn testTlsGdNoPlt(b: *Build, opts: Options) *Step { |
| 2074 | exe.linkLibrary(b_so); | 2106 | exe.linkLibrary(b_so); |
| 2075 | exe.linkLibC(); | 2107 | exe.linkLibC(); |
| 2076 | // exe.link_relax = false; // TODO | 2108 | // exe.link_relax = false; // TODO |
| | 2109 | // https://github.com/ziglang/zig/issues/17619 |
| | 2110 | exe.pie = true; |
| 2077 | | 2111 | |
| 2078 | const run = addRunArtifact(exe); | 2112 | const run = addRunArtifact(exe); |
| 2079 | run.expectStdOutEqual("1 2 3 4 5 6\n"); | 2113 | run.expectStdOutEqual("1 2 3 4 5 6\n"); |
| ... | @@ -2117,6 +2151,8 @@ fn testTlsGdToIe(b: *Build, opts: Options) *Step { | ... | @@ -2117,6 +2151,8 @@ fn testTlsGdToIe(b: *Build, opts: Options) *Step { |
| 2117 | exe.addObject(b_o); | 2151 | exe.addObject(b_o); |
| 2118 | exe.linkLibrary(dso); | 2152 | exe.linkLibrary(dso); |
| 2119 | exe.linkLibC(); | 2153 | exe.linkLibC(); |
| | 2154 | // https://github.com/ziglang/zig/issues/17619 |
| | 2155 | exe.pie = true; |
| 2120 | | 2156 | |
| 2121 | const run = addRunArtifact(exe); | 2157 | const run = addRunArtifact(exe); |
| 2122 | run.expectStdOutEqual("1 2 3\n"); | 2158 | run.expectStdOutEqual("1 2 3\n"); |
| ... | @@ -2132,6 +2168,8 @@ fn testTlsGdToIe(b: *Build, opts: Options) *Step { | ... | @@ -2132,6 +2168,8 @@ fn testTlsGdToIe(b: *Build, opts: Options) *Step { |
| 2132 | exe.addObject(b_o); | 2168 | exe.addObject(b_o); |
| 2133 | exe.linkLibrary(dso); | 2169 | exe.linkLibrary(dso); |
| 2134 | exe.linkLibC(); | 2170 | exe.linkLibC(); |
| | 2171 | // https://github.com/ziglang/zig/issues/17619 |
| | 2172 | exe.pie = true; |
| 2135 | | 2173 | |
| 2136 | const run = addRunArtifact(exe); | 2174 | const run = addRunArtifact(exe); |
| 2137 | run.expectStdOutEqual("1 2 3\n"); | 2175 | run.expectStdOutEqual("1 2 3\n"); |
| ... | @@ -2211,6 +2249,8 @@ fn testTlsIe(b: *Build, opts: Options) *Step { | ... | @@ -2211,6 +2249,8 @@ fn testTlsIe(b: *Build, opts: Options) *Step { |
| 2211 | exe.addObject(main_o); | 2249 | exe.addObject(main_o); |
| 2212 | exe.linkLibrary(dso); | 2250 | exe.linkLibrary(dso); |
| 2213 | exe.linkLibC(); | 2251 | exe.linkLibC(); |
| | 2252 | // https://github.com/ziglang/zig/issues/17619 |
| | 2253 | exe.pie = true; |
| 2214 | | 2254 | |
| 2215 | const run = addRunArtifact(exe); | 2255 | const run = addRunArtifact(exe); |
| 2216 | run.expectStdOutEqual(exp_stdout); | 2256 | run.expectStdOutEqual(exp_stdout); |
| ... | @@ -2223,6 +2263,8 @@ fn testTlsIe(b: *Build, opts: Options) *Step { | ... | @@ -2223,6 +2263,8 @@ fn testTlsIe(b: *Build, opts: Options) *Step { |
| 2223 | exe.linkLibrary(dso); | 2263 | exe.linkLibrary(dso); |
| 2224 | exe.linkLibC(); | 2264 | exe.linkLibC(); |
| 2225 | // exe.link_relax = false; // TODO | 2265 | // exe.link_relax = false; // TODO |
| | 2266 | // https://github.com/ziglang/zig/issues/17619 |
| | 2267 | exe.pie = true; |
| 2226 | | 2268 | |
| 2227 | const run = addRunArtifact(exe); | 2269 | const run = addRunArtifact(exe); |
| 2228 | run.expectStdOutEqual(exp_stdout); | 2270 | run.expectStdOutEqual(exp_stdout); |
| ... | @@ -2270,6 +2312,8 @@ fn testTlsLargeAlignment(b: *Build, opts: Options) *Step { | ... | @@ -2270,6 +2312,8 @@ fn testTlsLargeAlignment(b: *Build, opts: Options) *Step { |
| 2270 | exe.addObject(c_o); | 2312 | exe.addObject(c_o); |
| 2271 | exe.linkLibrary(dso); | 2313 | exe.linkLibrary(dso); |
| 2272 | exe.linkLibC(); | 2314 | exe.linkLibC(); |
| | 2315 | // https://github.com/ziglang/zig/issues/17619 |
| | 2316 | exe.pie = true; |
| 2273 | | 2317 | |
| 2274 | const run = addRunArtifact(exe); | 2318 | const run = addRunArtifact(exe); |
| 2275 | run.expectStdOutEqual("42 1 2 3\n"); | 2319 | run.expectStdOutEqual("42 1 2 3\n"); |
| ... | @@ -2282,6 +2326,8 @@ fn testTlsLargeAlignment(b: *Build, opts: Options) *Step { | ... | @@ -2282,6 +2326,8 @@ fn testTlsLargeAlignment(b: *Build, opts: Options) *Step { |
| 2282 | exe.addObject(b_o); | 2326 | exe.addObject(b_o); |
| 2283 | exe.addObject(c_o); | 2327 | exe.addObject(c_o); |
| 2284 | exe.linkLibC(); | 2328 | exe.linkLibC(); |
| | 2329 | // https://github.com/ziglang/zig/issues/17619 |
| | 2330 | exe.pie = true; |
| 2285 | | 2331 | |
| 2286 | const run = addRunArtifact(exe); | 2332 | const run = addRunArtifact(exe); |
| 2287 | run.expectStdOutEqual("42 1 2 3\n"); | 2333 | run.expectStdOutEqual("42 1 2 3\n"); |
| ... | @@ -2315,6 +2361,8 @@ fn testTlsLargeTbss(b: *Build, opts: Options) *Step { | ... | @@ -2315,6 +2361,8 @@ fn testTlsLargeTbss(b: *Build, opts: Options) *Step { |
| 2315 | \\} | 2361 | \\} |
| 2316 | , &.{}); | 2362 | , &.{}); |
| 2317 | exe.linkLibC(); | 2363 | exe.linkLibC(); |
| | 2364 | // https://github.com/ziglang/zig/issues/17619 |
| | 2365 | exe.pie = true; |
| 2318 | | 2366 | |
| 2319 | const run = addRunArtifact(exe); | 2367 | const run = addRunArtifact(exe); |
| 2320 | run.expectStdOutEqual("3 0 5 0 0 0\n"); | 2368 | run.expectStdOutEqual("3 0 5 0 0 0\n"); |
| ... | @@ -2337,6 +2385,8 @@ fn testTlsLargeStaticImage(b: *Build, opts: Options) *Step { | ... | @@ -2337,6 +2385,8 @@ fn testTlsLargeStaticImage(b: *Build, opts: Options) *Step { |
| 2337 | , &.{}); | 2385 | , &.{}); |
| 2338 | exe.force_pic = true; | 2386 | exe.force_pic = true; |
| 2339 | exe.linkLibC(); | 2387 | exe.linkLibC(); |
| | 2388 | // https://github.com/ziglang/zig/issues/17619 |
| | 2389 | exe.pie = true; |
| 2340 | | 2390 | |
| 2341 | const run = addRunArtifact(exe); | 2391 | const run = addRunArtifact(exe); |
| 2342 | run.expectStdOutEqual("1 2 3 0 5\n"); | 2392 | run.expectStdOutEqual("1 2 3 0 5\n"); |
| ... | @@ -2375,6 +2425,8 @@ fn testTlsLd(b: *Build, opts: Options) *Step { | ... | @@ -2375,6 +2425,8 @@ fn testTlsLd(b: *Build, opts: Options) *Step { |
| 2375 | exe.addObject(main_o); | 2425 | exe.addObject(main_o); |
| 2376 | exe.addObject(a_o); | 2426 | exe.addObject(a_o); |
| 2377 | exe.linkLibC(); | 2427 | exe.linkLibC(); |
| | 2428 | // https://github.com/ziglang/zig/issues/17619 |
| | 2429 | exe.pie = true; |
| 2378 | | 2430 | |
| 2379 | const run = addRunArtifact(exe); | 2431 | const run = addRunArtifact(exe); |
| 2380 | run.expectStdOutEqual(exp_stdout); | 2432 | run.expectStdOutEqual(exp_stdout); |
| ... | @@ -2387,6 +2439,8 @@ fn testTlsLd(b: *Build, opts: Options) *Step { | ... | @@ -2387,6 +2439,8 @@ fn testTlsLd(b: *Build, opts: Options) *Step { |
| 2387 | exe.addObject(a_o); | 2439 | exe.addObject(a_o); |
| 2388 | exe.linkLibC(); | 2440 | exe.linkLibC(); |
| 2389 | // exe.link_relax = false; // TODO | 2441 | // exe.link_relax = false; // TODO |
| | 2442 | // https://github.com/ziglang/zig/issues/17619 |
| | 2443 | exe.pie = true; |
| 2390 | | 2444 | |
| 2391 | const run = addRunArtifact(exe); | 2445 | const run = addRunArtifact(exe); |
| 2392 | run.expectStdOutEqual(exp_stdout); | 2446 | run.expectStdOutEqual(exp_stdout); |
| ... | @@ -2420,6 +2474,8 @@ fn testTlsLdDso(b: *Build, opts: Options) *Step { | ... | @@ -2420,6 +2474,8 @@ fn testTlsLdDso(b: *Build, opts: Options) *Step { |
| 2420 | , &.{}); | 2474 | , &.{}); |
| 2421 | exe.linkLibrary(dso); | 2475 | exe.linkLibrary(dso); |
| 2422 | exe.linkLibC(); | 2476 | exe.linkLibC(); |
| | 2477 | // https://github.com/ziglang/zig/issues/17619 |
| | 2478 | exe.pie = true; |
| 2423 | | 2479 | |
| 2424 | const run = addRunArtifact(exe); | 2480 | const run = addRunArtifact(exe); |
| 2425 | run.expectStdOutEqual("1 2\n"); | 2481 | run.expectStdOutEqual("1 2\n"); |
| ... | @@ -2457,6 +2513,8 @@ fn testTlsLdNoPlt(b: *Build, opts: Options) *Step { | ... | @@ -2457,6 +2513,8 @@ fn testTlsLdNoPlt(b: *Build, opts: Options) *Step { |
| 2457 | exe.addObject(a_o); | 2513 | exe.addObject(a_o); |
| 2458 | exe.addObject(b_o); | 2514 | exe.addObject(b_o); |
| 2459 | exe.linkLibC(); | 2515 | exe.linkLibC(); |
| | 2516 | // https://github.com/ziglang/zig/issues/17619 |
| | 2517 | exe.pie = true; |
| 2460 | | 2518 | |
| 2461 | const run = addRunArtifact(exe); | 2519 | const run = addRunArtifact(exe); |
| 2462 | run.expectStdOutEqual("3 5 3 5\n"); | 2520 | run.expectStdOutEqual("3 5 3 5\n"); |
| ... | @@ -2469,6 +2527,8 @@ fn testTlsLdNoPlt(b: *Build, opts: Options) *Step { | ... | @@ -2469,6 +2527,8 @@ fn testTlsLdNoPlt(b: *Build, opts: Options) *Step { |
| 2469 | exe.addObject(b_o); | 2527 | exe.addObject(b_o); |
| 2470 | exe.linkLibC(); | 2528 | exe.linkLibC(); |
| 2471 | // exe.link_relax = false; // TODO | 2529 | // exe.link_relax = false; // TODO |
| | 2530 | // https://github.com/ziglang/zig/issues/17619 |
| | 2531 | exe.pie = true; |
| 2472 | | 2532 | |
| 2473 | const run = addRunArtifact(exe); | 2533 | const run = addRunArtifact(exe); |
| 2474 | run.expectStdOutEqual("3 5 3 5\n"); | 2534 | run.expectStdOutEqual("3 5 3 5\n"); |
| ... | @@ -2554,6 +2614,8 @@ fn testTlsOffsetAlignment(b: *Build, opts: Options) *Step { | ... | @@ -2554,6 +2614,8 @@ fn testTlsOffsetAlignment(b: *Build, opts: Options) *Step { |
| 2554 | exe.addRPath(dso.getEmittedBinDirectory()); | 2614 | exe.addRPath(dso.getEmittedBinDirectory()); |
| 2555 | exe.linkLibC(); | 2615 | exe.linkLibC(); |
| 2556 | exe.force_pic = true; | 2616 | exe.force_pic = true; |
| | 2617 | // https://github.com/ziglang/zig/issues/17619 |
| | 2618 | exe.pie = true; |
| 2557 | | 2619 | |
| 2558 | const run = addRunArtifact(exe); | 2620 | const run = addRunArtifact(exe); |
| 2559 | run.expectExitCode(0); | 2621 | run.expectExitCode(0); |
| ... | @@ -2588,6 +2650,8 @@ fn testTlsPic(b: *Build, opts: Options) *Step { | ... | @@ -2588,6 +2650,8 @@ fn testTlsPic(b: *Build, opts: Options) *Step { |
| 2588 | , &.{}); | 2650 | , &.{}); |
| 2589 | exe.addObject(obj); | 2651 | exe.addObject(obj); |
| 2590 | exe.linkLibC(); | 2652 | exe.linkLibC(); |
| | 2653 | // https://github.com/ziglang/zig/issues/17619 |
| | 2654 | exe.pie = true; |
| 2591 | | 2655 | |
| 2592 | const run = addRunArtifact(exe); | 2656 | const run = addRunArtifact(exe); |
| 2593 | run.expectStdOutEqual("3 5 3 5\n"); | 2657 | run.expectStdOutEqual("3 5 3 5\n"); |
| ... | @@ -2627,6 +2691,8 @@ fn testTlsSmallAlignment(b: *Build, opts: Options) *Step { | ... | @@ -2627,6 +2691,8 @@ fn testTlsSmallAlignment(b: *Build, opts: Options) *Step { |
| 2627 | exe.addObject(b_o); | 2691 | exe.addObject(b_o); |
| 2628 | exe.addObject(c_o); | 2692 | exe.addObject(c_o); |
| 2629 | exe.linkLibC(); | 2693 | exe.linkLibC(); |
| | 2694 | // https://github.com/ziglang/zig/issues/17619 |
| | 2695 | exe.pie = true; |
| 2630 | | 2696 | |
| 2631 | const run = addRunArtifact(exe); | 2697 | const run = addRunArtifact(exe); |
| 2632 | run.expectStdOutEqual("42\n"); | 2698 | run.expectStdOutEqual("42\n"); |
| ... | @@ -2642,6 +2708,8 @@ fn testTlsSmallAlignment(b: *Build, opts: Options) *Step { | ... | @@ -2642,6 +2708,8 @@ fn testTlsSmallAlignment(b: *Build, opts: Options) *Step { |
| 2642 | exe.addObject(c_o); | 2708 | exe.addObject(c_o); |
| 2643 | exe.linkLibrary(dso); | 2709 | exe.linkLibrary(dso); |
| 2644 | exe.linkLibC(); | 2710 | exe.linkLibC(); |
| | 2711 | // https://github.com/ziglang/zig/issues/17619 |
| | 2712 | exe.pie = true; |
| 2645 | | 2713 | |
| 2646 | const run = addRunArtifact(exe); | 2714 | const run = addRunArtifact(exe); |
| 2647 | run.expectStdOutEqual("42\n"); | 2715 | run.expectStdOutEqual("42\n"); |
| ... | @@ -2711,6 +2779,8 @@ fn testWeakExports(b: *Build, opts: Options) *Step { | ... | @@ -2711,6 +2779,8 @@ fn testWeakExports(b: *Build, opts: Options) *Step { |
| 2711 | const exe = addExecutable(b, "main", opts); | 2779 | const exe = addExecutable(b, "main", opts); |
| 2712 | exe.addObject(obj); | 2780 | exe.addObject(obj); |
| 2713 | exe.linkLibC(); | 2781 | exe.linkLibC(); |
| | 2782 | // https://github.com/ziglang/zig/issues/17619 |
| | 2783 | exe.pie = true; |
| 2714 | | 2784 | |
| 2715 | const check = exe.checkObject(); | 2785 | const check = exe.checkObject(); |
| 2716 | check.checkInDynamicSymtab(); | 2786 | check.checkInDynamicSymtab(); |
| ... | @@ -2743,6 +2813,8 @@ fn testWeakUndefsDso(b: *Build, opts: Options) *Step { | ... | @@ -2743,6 +2813,8 @@ fn testWeakUndefsDso(b: *Build, opts: Options) *Step { |
| 2743 | , &.{}); | 2813 | , &.{}); |
| 2744 | exe.linkLibrary(dso); | 2814 | exe.linkLibrary(dso); |
| 2745 | exe.linkLibC(); | 2815 | exe.linkLibC(); |
| | 2816 | // https://github.com/ziglang/zig/issues/17619 |
| | 2817 | exe.pie = true; |
| 2746 | | 2818 | |
| 2747 | const run = addRunArtifact(exe); | 2819 | const run = addRunArtifact(exe); |
| 2748 | run.expectStdOutEqual("bar=-1\n"); | 2820 | run.expectStdOutEqual("bar=-1\n"); |
| ... | @@ -2759,6 +2831,8 @@ fn testWeakUndefsDso(b: *Build, opts: Options) *Step { | ... | @@ -2759,6 +2831,8 @@ fn testWeakUndefsDso(b: *Build, opts: Options) *Step { |
| 2759 | , &.{}); | 2831 | , &.{}); |
| 2760 | exe.linkLibrary(dso); | 2832 | exe.linkLibrary(dso); |
| 2761 | exe.linkLibC(); | 2833 | exe.linkLibC(); |
| | 2834 | // https://github.com/ziglang/zig/issues/17619 |
| | 2835 | exe.pie = true; |
| 2762 | | 2836 | |
| 2763 | const run = addRunArtifact(exe); | 2837 | const run = addRunArtifact(exe); |
| 2764 | run.expectStdOutEqual("bar=5\n"); | 2838 | run.expectStdOutEqual("bar=5\n"); |
| ... | @@ -2866,6 +2940,8 @@ fn testZText(b: *Build, opts: Options) *Step { | ... | @@ -2866,6 +2940,8 @@ fn testZText(b: *Build, opts: Options) *Step { |
| 2866 | , &.{}); | 2940 | , &.{}); |
| 2867 | exe.linkLibrary(dso); | 2941 | exe.linkLibrary(dso); |
| 2868 | exe.linkLibC(); | 2942 | exe.linkLibC(); |
| | 2943 | // https://github.com/ziglang/zig/issues/17619 |
| | 2944 | exe.pie = true; |
| 2869 | | 2945 | |
| 2870 | const run = addRunArtifact(exe); | 2946 | const run = addRunArtifact(exe); |
| 2871 | run.expectStdOutEqual("3\n"); | 2947 | run.expectStdOutEqual("3\n"); |