Date: Mon, 02 Jan 2017 14:29:01 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-threads@FreeBSD.org Subject: [Bug 215709] Use of thread_local produces linking errors [now with gcc] Message-ID: <bug-215709-16@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215709 Bug ID: 215709 Summary: Use of thread_local produces linking errors [now with gcc] Product: Base System Version: 11.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: threads Assignee: freebsd-threads@FreeBSD.org Reporter: h2+fbsdports@fsfe.org 192320 implemented __cxa_thread_atexit so that base's clang now supports c++11's thread_local keyword. However, this seems to now have broken static linking with the GCCs that complain about double definitions: cd /home/mi/h4nn3s/devel/lambda-build/pkg/src && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/lambda.dir/link.txt --verbose=3D1 /usr/local/libexec/ccache/g++6 -fopenmp -Wno-vla -O3 -DNDEBUG -flto=3D8= -s=20=20 -static CMakeFiles/lambda.dir/lambda.cpp.o -o ../bin/lambda -lpthread -lexecinfo -lelf -lz -lbz2=20 //usr/lib/libc.a(cxa_thread_atexit.o): In function `__cxa_thread_atexit': /usr/src/lib/libc/stdlib/cxa_thread_atexit.c:(.text+0x0): multiple definiti= on of `__cxa_thread_atexit' /usr/local/lib/gcc6/gcc/x86_64-portbld-freebsd11.0/6.3.0/../../../libstdc++= .a(atexit_thread.o):/wrkdirs/usr/ports/lang/gcc6/work/gcc-6.3.0/libstdc++-v= 3/libsupc++/atexit_thread.cc:117: first defined here collect2: error: ld returned 1 exit status So now a I have a workaround for FreeBSD<11 + LLVM and I seem to need one f= or FreeBSD>=3D11 + GCC. Needless to say, static linking with LLVM already does= n't work at all, because the necessary openmp .a is not shipped. It's starting to really get confusing :o Anything I can do to help fix this? Thanks! --=20 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-215709-16>