diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-04-04 01:08:26 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-04-04 01:08:26 -0400 |
| commit | e4d595a8ba2e4466dc29bec7bc90a04420b34d4d (patch) | |
| tree | 4d062b3b3a2cb026b9f12b49b618e9d3a68ffc2e /src/main.cpp | |
| parent | 70ae3222b54c05fc88e9c94a1ae12ead07fa4341 (diff) | |
| download | zig-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 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 76261d4d68..bd3d574956 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -938,11 +938,6 @@ int main(int argc, char **argv) { return print_error_usage(arg0); } - if (out_type != OutTypeLib && is_dynamic) { - fprintf(stderr, "`-dynamic` may only be specified with `build-lib`.\n"); - return print_error_usage(arg0); - } - if (llvm_argv.length > 1) { llvm_argv.append(nullptr); ZigLLVMParseCommandLineOptions(llvm_argv.length - 1, llvm_argv.items); |
