https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78968
--- Comment #16 from Jonathan Wakely <redi at gcc dot gnu.org> --- 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.