From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22528 invoked by alias); 6 Jul 2011 14:07:53 -0000 Received: (qmail 22516 invoked by uid 22791); 6 Jul 2011 14:07:52 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Jul 2011 14:07:38 +0000 From: "ro at CeBiTec dot Uni-Bielefeld.DE" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/49541] [4.6/4.7 regression] TLS support partially broken in 64-bit mode X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at CeBiTec dot Uni-Bielefeld.DE X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.2 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 06 Jul 2011 14:07:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg00431.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49541 --- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE 2011-07-06 14:06:59 UTC --- > --- Comment #1 from Eric Botcazou 2011-07-06 08:52:17 UTC --- > Rainer, any idea to solve this? One comment up front: It's best to directly Cc: me in PRs, otherwise I may easily miss them. It took me some time to understand why this didn't hit me in my S8 bootstraps, but they run in an S8 branded zone, where the alternate thread library is copied over the default one, so __tls_get_addr is also found in /lib/sparcv9/libthread.so. Trying on our only native S8 machine, I see the same failure. I think the only solution is to move LIB_THREAD_LDFLAGS_SPEC out of LIB_SPEC (which is way too late, as you've observed) and into or in front of LINK_ARCH_SPEC where all the other -L/-R flags are passed. I'll have a look at this. Rainer