[Bug 192320] New: Use of thread_local produces linking errors on system version of clang++
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Aug 1 22:09:39 UTC 2014
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 at FreeBSD.org
Reporter: troy.heron at 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 at freebsd10:~ # cat tl.cpp
#include <string>
thread_local std::string test;
int main()
{
}
troy at 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 at freebsd10:~ #
troy at freebsd10:~ # clang++ -v
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd10.0
Thread model: posix
troy at freebsd10:~ #
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list