Date: Fri, 1 Aug 2014 12:46:28 -0700 From: hiren panchasara <hiren.panchasara@gmail.com> To: Troy Heron <troy.heron@hixxy.org> Cc: freebsd-bugs@freebsd.org Subject: Re: thread_local broken on clang Message-ID: <CALCpEUHS0eR14OSRRQbVsZgNto6BiJ4skJRONtbTo88mbM7Hmw@mail.gmail.com> In-Reply-To: <CAMy2XzAAWcRR=7kNeajQNT9Q=%2BsxAh7JnWh-pTXsNyomdtBH%2Bg@mail.gmail.com> References: <CAMy2XzAAWcRR=7kNeajQNT9Q=%2BsxAh7JnWh-pTXsNyomdtBH%2Bg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 31, 2014 at 2:54 AM, Troy Heron <troy.heron@hixxy.org> wrote: > Hello, > > I'm attempting to port an application to FreeBSD (version 10 to be > specific). The application has been developed using C++11 and uses > thread_local. > > As below, the use of thread_local is giving me linking errors for 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:~ # > > Has anyone else experienced this? Should I report it as a bug? Please report a bug. You can also ask this question on freebsd-stable mailing list. cheers, Hiren
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALCpEUHS0eR14OSRRQbVsZgNto6BiJ4skJRONtbTo88mbM7Hmw>