aboutsummaryrefslogtreecommitdiff
path: root/test/stage1/behavior
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-04-04 01:08:26 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-04-04 01:08:26 -0400
commite4d595a8ba2e4466dc29bec7bc90a04420b34d4d (patch)
tree4d062b3b3a2cb026b9f12b49b618e9d3a68ffc2e /test/stage1/behavior
parent70ae3222b54c05fc88e9c94a1ae12ead07fa4341 (diff)
downloadzig-e4d595a8ba2e4466dc29bec7bc90a04420b34d4d.tar.gz
zig-e4d595a8ba2e4466dc29bec7bc90a04420b34d4d.zip
fix thread local variables for non- position independent code
This fixes comes thanks to Rich Felker from the musl libc project, who gave me this crucial information: "to satisfy the abi, your init code has to write the same value to that memory location as the value passed to the [arch_prctl] syscall" This commit also changes the rules for when to build statically by default. When building objects and static libraries, position independent code is disabled if no libraries will be dynamically linked and the target does not require position independent code. closes #2063
Diffstat (limited to 'test/stage1/behavior')
-rw-r--r--test/stage1/behavior/misc.zig5
1 files changed, 0 insertions, 5 deletions
diff --git a/test/stage1/behavior/misc.zig b/test/stage1/behavior/misc.zig
index fd407821e6..4cc401a008 100644
--- a/test/stage1/behavior/misc.zig
+++ b/test/stage1/behavior/misc.zig
@@ -688,11 +688,6 @@ fn getNull() ?*i32 {
}
test "thread local variable" {
- if (!builtin.position_independent_code and !builtin.link_libc) {
- // TODO https://github.com/ziglang/zig/issues/2063
- return error.SkipZigTest;
- }
-
const S = struct {
threadlocal var t: i32 = 1234;
};