https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112858
--- Comment #2 from Thomas Schwinge <tschwinge at gcc dot gnu.org> --- Earlier in 'libstdc++-v3/libsupc++/atexit_thread.cc', we have: [...] #if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT // Libc provides __cxa_thread_atexit definition. #elif _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL extern "C" int __cxa_thread_atexit_impl (void (_GLIBCXX_CDTOR_CALLABI *func) (void *), void *arg, void *d); extern "C" int __cxxabiv1::__cxa_thread_atexit (void (_GLIBCXX_CDTOR_CALLABI *dtor)(void *), void *obj, void *dso_handle) _GLIBCXX_NOTHROW { return __cxa_thread_atexit_impl (dtor, obj, dso_handle); } #else /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ [...] ..., that is, indeed a non-weak '__cxa_thread_atexit_impl' declaration -- however, that's active only if not '_GLIBCXX_HAVE___CXA_THREAD_ATEXIT' and not '_GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL', but we have per 'include/nvptx-none/bits/c++config.h': /* Define to 1 if you have the `__cxa_thread_atexit' function. */ /* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT */ /* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */ /* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */