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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user