HomeFreeBSD

Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.

Description

Export cxa_thread_atexit_impl as an alias for cxa_thread_atexit.

libstdc++ before gcc r244057 expected that libc provided
cxa_thread_atexit_impl, and libstdc++ implemented
cxa_thread_atexit, by forwarding the calls to _impl. Mentioned gcc
revision checks for __cxa_thread_atexit in libc and does not provide
the symbol from libstdc++ if found.

This change helps older gcc, in particular, all released versions
which implement thread_local, by consolidating the implementation into
libc. For that versions, if configured with the current libc, the
cxa_thread_atexit is exported from libstdc++ as a trivial wrapper
around libc::
cxa_thread_atexit_impl.

The __cxa_thread_atexit implementation is put into separate source
file to allow for static linking with older libstdc++.a.

gcc bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78968
Reported by: Hannes Hauswedell <h2+fbsdports@fsfe.org>
PR: 215709
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

Details

Provenance
kibAuthored on
Parents
rS311650: Restore priority value for OGIO_KEYMAP
Branches
Unknown
Tags
Unknown