0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00

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:
Andrew Kelley 2019-04-04 01:08:26 -04:00
commit e4d595a8ba
No known key found for this signature in database
GPG key ID: 7C5F548F728501A9
6 changed files with 15 additions and 31 deletions