https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78968
--- Comment #18 from Konstantin Belousov <kostikbel at ukr dot net> --- (In reply to Jonathan Wakely from comment #16) > Trunk no longer defines __cxa_thread_atexit if it's found in libc. We might > want to backport this to the gcc-5-branch and gcc-6-branch. > > I will try to test this in a FreeBSD 11 VM some time soon. I just built trunk gcc on FreeBSD HEAD. Indeed, the newest gcc does not export __cxa_thread_atexit from libstdc++.so.6 when configured on a FreeBSD system which provides the symbol from libc. I also added __cxa_thread_atexit_impl, which does help with older gcc versions. I verified that libstdc++.so.6 provides __cxa_thread_atexit and expectedly forwards the calls to libc:__cxa_thread_atexit_impl. https://svnweb.freebsd.org/changeset/base/311651