https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58142
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- Yes, it's almost certainly not specific to OS X, but will affect other targets without __cxa_thread_atexit or __cxa_thread_atexit_impl in libc (possibly only ones with emulated TLS, I'm not sure).