[Bug target/100641] Link error when using extern thread_local variables on AIX

2024-04-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100641

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|UNCONFIRMED |RESOLVED

--- Comment #3 from Andrew Pinski  ---
Dup.

*** This bug has been marked as a duplicate of bug 93146 ***

[Bug target/100641] Link error when using extern thread_local variables on AIX

2022-03-20 Thread hstong at ca dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100641

Hubert Tong  changed:

   What|Removed |Added

 CC||hstong at ca dot ibm.com

--- Comment #2 from Hubert Tong  ---
This was addressed in Clang last year. The AIX linker does not have the same
weak reference semantics as some other linkers. The means that the TLS init
function needs to be defined by the object file containing the definition of
the `thread_local` variable if the language semantics does not make it so that
all potential references occur in contexts where it is known that the
initialization/finalization is constant.