<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/stdlib/cxa_thread_atexit_impl.c, branch releng/13.1</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.</title>
<updated>2017-01-07T16:05:19+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2017-01-07T16:05:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b7c7684ae2754d4ef865bb62ce2c502b0d22ad62'/>
<id>b7c7684ae2754d4ef865bb62ce2c502b0d22ad62</id>
<content type='text'>
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 &lt;h2+fbsdports@fsfe.org&gt;
PR:	215709
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;h2+fbsdports@fsfe.org&gt;
PR:	215709
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
</feed>
