Date: Fri, 01 Aug 2014 22:09:39 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 192320] New: Use of thread_local produces linking errors on system version of clang++ Message-ID: <bug-192320-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Bug ID: 192320 Summary: Use of thread_local produces linking errors on system version of clang++ Product: Base System Version: 10.0-STABLE Hardware: amd64 OS: Any Status: Needs Triage Severity: Affects Some People Priority: --- Component: misc Assignee: freebsd-bugs@FreeBSD.org Reporter: troy.heron@hixxy.org During porting of a C++ application to FreeBSD I have discovered problem with using thread_local with the system version of Clang 3.3. As below, it's use produces linking errors to the C++ ABI. troy@freebsd10:~ # cat tl.cpp #include <string> thread_local std::string test; int main() { } troy@freebsd10:~ # clang++ -std=c++11 tl.cpp -o tl /tmp/tl-7sN7Nb.o: In function `__cxx_global_var_init': tl.cpp:(.text+0xbb): undefined reference to `__cxa_thread_atexit' clang++: error: linker command failed with exit code 1 (use -v to see invocation) troy@freebsd10:~ # troy@freebsd10:~ # clang++ -v FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 Target: x86_64-unknown-freebsd10.0 Thread model: posix troy@freebsd10:~ # -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-192320-8>