https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58142

--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
So .. I had a look in the sources for libc.
cxa_thread_atexit is implemented as a wrapper function that calls _tlv_atexit
(provided in lib/system/libdyld.dylib, which is part of the umbrella
"libSystem" which includes libc).  dyld is Darwin's dynamic linker, BTW.

That function exists on Darwin11 and 12 so (in principle) we could provide the
missing wrapper as a CRT for Darwin11 and 12.

However, I don't think that going to happen any time soon - someone wishing to
make it work locally could effectively do the same thing.

my_cxa_thread_at_exit (void (*fun)(void*), void *a)
{
  _tlv_atexit (fun, a);
}


So, I'd say [at least] we could demote this to P4 or lower, I'd not object to
closing it as "WONTFIX" either

Apparently it's "just working" with emuTLS - but only when the OS has the
callback on thread exit.  There _might_ be some other thread exit callback that
could be used - I'd need to see what dyld is actually implementing for
tlv_atexit.

Reply via email to