From owner-freebsd-threads@freebsd.org Mon Jan 2 14:29:01 2017 Return-Path: Delivered-To: freebsd-threads@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1D98C9C6E3 for ; Mon, 2 Jan 2017 14:29:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7824718D2 for ; Mon, 2 Jan 2017 14:29:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v02ET18J019950 for ; Mon, 2 Jan 2017 14:29:01 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-threads@FreeBSD.org Subject: [Bug 215709] Use of thread_local produces linking errors [now with gcc] Date: Mon, 02 Jan 2017 14:29:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 11.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: h2+fbsdports@fsfe.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 14:29:01 -0000 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.=