https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78968
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Kostik Belousov from comment #9) > Would older gcc releases fine if FreeBSD exports __cxa_thread_atexit_impl as > an alias for __cxa_thread_atexit ? I think there would still be a duplicate definition of __cxa_thread_atexit in that case. > Note that there were no FreeBSD release > which provided __cxa_thread_atexit, although the symbol is already present > on the stable/11 branch and cannot be removed due ABI compat guarantees. It > is used by libc++ already, I believe. Is that a local change in FreeBSD's copy of libc++? Because there's no reference to it in the upstream libc++ repo. > Request for __cxa_thread_atexit came directly from one of the LLVM > developers, at least this is how I see the history. I understand the desire to have __cxa_thread_atexit available. The point is that it belongs in the C++ runtime, and that at least two implementations of the C++ runtime (libsupc++ and libcxxabi) already do the same thing, defining __cxa_thread_atexit unconditionally, but making use of __cxa_thread_atexit_impl if libc provides that.