From patchwork Thu Oct 28 14:53:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 69470 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id DE069B70AA for ; Fri, 29 Oct 2010 01:54:02 +1100 (EST) Received: (qmail 4975 invoked by alias); 28 Oct 2010 14:53:58 -0000 Received: (qmail 4962 invoked by uid 22791); 28 Oct 2010 14:53:57 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Oct 2010 14:53:53 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id CDA40B5 for ; Thu, 28 Oct 2010 16:53:50 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ghNq2YfKj0it for ; Thu, 28 Oct 2010 16:53:48 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 60F32B4 for ; Thu, 28 Oct 2010 16:53:48 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id o9SErlhW029048; Thu, 28 Oct 2010 16:53:47 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Subject: [build] Disable native TLS support on IRIX 6/Tru64 UNIX Date: Thu, 28 Oct 2010 16:53:47 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org I noticed that all TLS execution tests were failing on IRIX 6.5 because they didn't link: ld32: FATAL 2 : Internal: at ../../ld/relocate.c &relc_attr_mips table inconsistent with number of relocation entries Further investigation revealed that the object files included TLS relocations (since gas 2.20.1 is in use and gas is required for all MIPS targets), but the native linker doesn't know about them and errors out as above. shows that the system knows about none of the TLS relocs (R_MIPS_JALR is the last one listed), and even if gld were in use (which doesn't work as of 2.20.1, cf. PR target/43533), this wouldn't help since rld and libc.so lack TLS support. So I'm completely disabling native TLS support to avoid this issue. First tested with a --disable-tls bootstrap (which is a misnomer right now, this should rather be --disable-native-tls now), which fixed the TLS tests, but introduced a couple of other failures. I'll investigate them later, but this patch is still the right thing to do: native TLS simply cannot work on this target. While I'm at it, I'm also disabling native TLS on Tru64 UNIX which might later run into similar issues: while as of 2.20.1, gas doesn't work (there are open PRs for that) and gld isn't fully supported (no shared library support), I'd like to avoid hitting the same problem later on since that platform hasn't native TLS support either. mips-sgi-irix6.5 bootstrap in progress; will commit once that has finished. Rainer 2010-10-28 Rainer Orth gcc: * configure.ac (*-*-irix6*): Disable set_have_as_tls. (*-*-osf*): Likewise. * configure: Regenerate. diff -r 96121b207452 gcc/configure.ac --- a/gcc/configure.ac Thu Oct 28 15:36:20 2010 +0200 +++ b/gcc/configure.ac Thu Oct 28 16:32:37 2010 +0200 @@ -2998,6 +2998,16 @@ [set_have_as_tls=yes]) fi case "$target" in + *-*-irix6*) + # IRIX 6.5 rld and libc.so lack TLS support, so even if gas and gld + # with TLS support are in use, native TLS cannot work. + set_have_as_tls=no + ;; + *-*-osf*) + # Tru64 UNIX loader and libc.so lack TLS support, so even if gas and + # gld with TLS support are in use, native TLS cannot work. + set_have_as_tls=no + ;; # TLS was introduced in the Solaris 9 FCS release and backported to # Solaris 8 patches. Support for GNU-style TLS on x86 was only # introduced in Solaris 9 4/04, replacing the earlier Sun style that Sun