From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28594 invoked by alias); 15 Jul 2011 12:01:48 -0000 Received: (qmail 28583 invoked by uid 22791); 15 Jul 2011 12:01:47 -0000 X-SWARE-Spam-Status: No, hits=-2.8 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; Fri, 15 Jul 2011 12:01:33 +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: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ro 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: Fri, 15 Jul 2011 12:01: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/msg01237.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49541 --- Comment #14 from ro at CeBiTec dot Uni-Bielefeld.DE 2011-07-15 12:01:02 UTC --- > The problem is that the testsuite (lib/libgomp.exp) unconditionally > links with -lgomp even for the -fno-openmp testcases. I'd argue that > this is a testsuite-only problem (pilot error, actually) and can be > worked around by use of dg-add-options tls. On second thought, it seems better to just remove the explicit -lgomp. The following patch worked for me on sparc-pc-solaris2.8, i386-pc-solaris2.10, and x86_64-unknown-linux-gnu: diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -137,7 +137,6 @@ proc libgomp_init { args } { lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs" } lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/.." - lappend ALWAYS_CFLAGS "ldflags=-lgomp" # We use atomic operations in the testcases to validate results. if { ([istarget i?86-*-*] || [istarget x86_64-*-*]) Rainer