[Bug 215709] Use of thread_local produces linking errors [now with gcc]

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 2 16:16:35 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215709

Konstantin Belousov <kib at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kib at FreeBSD.org

--- Comment #1 from Konstantin Belousov <kib at FreeBSD.org> ---
This is a bug in gcc.  The libsupc++ configuration assumes that there are
exactly two possibilities: either libc is glibc and implements
__cxa_thread_atexit() using __cxa_thread_atexit_impl(), or libsupc++ must
provide an implementation on its own.  Right solution is to add detection of
__cxa_thread_atexit() in libc, to libstdc++ configure.ac and
libsupc++/atexit_thread.cc.

A workaround for you is might be use of --allow-multiple-definition switch to
ld.  But what is not quite clear to me, is why libc  __cxa_thread_atexit was
searched for at all, since static linker should be satisfied with the first
definition it found.  Ensure that libstdc++.a appears strictly before libc.a on
the linker invocation' command line.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-threads mailing list