libsupc++: try cxa_thread_atexit_impl at runtime
commitf4dd9416843308d4ae519983415fe62212662536
authorAlexandre Oliva <oliva@adacore.com>
Sat, 2 Dec 2023 17:14:02 +0000 (2 14:14 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Sat, 2 Dec 2023 17:14:02 +0000 (2 14:14 -0300)
treed4d8500b2b891371ed0f305b8b59bc8cb7e7d58f
parent27ce74fa23c93c1189c301993cd19ea766e6bdb5
libsupc++: try cxa_thread_atexit_impl at runtime

g++.dg/tls/thread_local-order2.C fails when the toolchain is built for
a platform that lacks __cxa_thread_atexit_impl, even if the program is
built and run using that toolchain on a (later) platform that offers
__cxa_thread_atexit_impl.

This patch adds runtime testing for __cxa_thread_atexit_impl on
platforms that support weak symbols.

for  libstdc++-v3/ChangeLog

* libsupc++/atexit_thread.cc [__GXX_WEAK__]: Add dynamic
detection of __cxa_thread_atexit_impl.
libstdc++-v3/libsupc++/atexit_thread.cc