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.he...@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. _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"