From patchwork Thu Nov 25 18:37:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 73114 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 E069FB70B8 for ; Fri, 26 Nov 2010 05:38:08 +1100 (EST) Received: (qmail 8822 invoked by alias); 25 Nov 2010 18:37:58 -0000 Received: (qmail 8628 invoked by uid 22791); 25 Nov 2010 18:37:54 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, TW_BJ, TW_TJ, 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, 25 Nov 2010 18:37:48 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 4A68A947 for ; Thu, 25 Nov 2010 19:37:46 +0100 (CET) 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 Yutl6Aw-b-S6 for ; Thu, 25 Nov 2010 19:37:41 +0100 (CET) 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 0C86C946 for ; Thu, 25 Nov 2010 19:37:41 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id oAPIbeFV010250; Thu, 25 Nov 2010 19:37:40 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Subject: [4.5, testsuite] Backports of several IRIX testsuite fixes Date: Thu, 25 Nov 2010 19:37:40 +0100 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'd like to backport a couple of IRIX testsuite fixes that have lived on mainline for some time to the 4.5 branch. I think the only parts I may need approval for are the plugin-supports.exp and prune.exp changes, unless there are special rules for testsuite-only backports. The fixincludes patch has already been approved for all active branches. Bootstrapped without regressions on mips-sgi-irix6.5, ok for 4.5 (and eventually 4.4) branch? Can I check in the whole bunch together or would it it be better to do one commit per self-contained patch? Rainer 2010-11-25 Rainer Orth gcc: Backport from mainline: 2010-11-12 Rainer Orth * config/mips/iris6.h [!IRIX_USING_GNU_LD] (SUPPORTS_INIT_PRIORITY): Define. 2010-11-02 Rainer Orth * configure.ac (*-*-irix6*): Disable set_have_as_tls. (*-*-osf*): Likewise. * configure: Regenerate. gcc/testsuite: Backport from mainline: 2010-11-12 Rainer Orth * lib/prune.exp (prune_gcc_output): Ignore IRIX 6 linker multiline warning. * g++.dg/abi/packed1.C (struct INNER): Ignore warning on mips-sgi-irix*. * g++.dg/cpp/_Pragma1.C: Skip on mips-sgi-irix*. * gcc.target/mips/call-3.c: Add dg-require-visibility. 2010-07-16 Iain Sandoe PR testsuite/43925 * lib/plugin-support.exp (plugin-test-execute): Add ${gcc_objdir}/intl to includes. fixincludes: 2010-11-09 Rainer Orth * inclhack.def (irix_pthread_init): New fix. * fixincl.x: Regenerate. * tests/base/pthread.h [IRIX_PTHREAD_INIT_CHECK]: New test. diff -r 1e22feb8ab1d fixincludes/inclhack.def --- a/fixincludes/inclhack.def Mon Nov 22 19:48:47 2010 +0100 +++ b/fixincludes/inclhack.def Thu Nov 25 19:26:52 2010 +0100 @@ -2505,6 +2505,24 @@ /* + * IRIX 6.5 PTHREAD_*_INITIALIZER need an additional level of braces in + * . + */ +fix = { + hackname = irix_pthread_init; + files = pthread.h; + select = "^(#define[ \t]+PTHREAD_.*_INITIALIZER[ \t]+)(\\{ 0 \\})"; + + mach = "mips-sgi-irix6.5"; + c_fix = format; + c_fix_arg = "%1{ %2 }"; + test_text = "#define PTHREAD_MUTEX_INITIALIZER { 0 }\n" + "#define PTHREAD_COND_INITIALIZER { 0 }\n" + "#define PTHREAD_RWLOCK_INITIALIZER { 0 }"; +}; + + +/* * IRIX 6.5.1[78] has a broken definition of socklen_t. * Various socket function prototypes use different types instead, * depending on the API in use (BSD, XPG4/5), but the socklen_t diff -r 1e22feb8ab1d fixincludes/tests/base/pthread.h --- a/fixincludes/tests/base/pthread.h Mon Nov 22 19:48:47 2010 +0100 +++ b/fixincludes/tests/base/pthread.h Thu Nov 25 19:26:52 2010 +0100 @@ -96,6 +96,13 @@ #endif /* GLIBC_MUTEX_INIT_CHECK */ +#if defined( IRIX_PTHREAD_INIT_CHECK ) +#define PTHREAD_MUTEX_INITIALIZER { { 0 } } +#define PTHREAD_COND_INITIALIZER { { 0 } } +#define PTHREAD_RWLOCK_INITIALIZER { { 0 } } +#endif /* IRIX_PTHREAD_INIT_CHECK */ + + #if defined( PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK ) extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask); #endif /* PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK */ diff -r 1e22feb8ab1d gcc/config/mips/iris.h --- a/gcc/config/mips/iris.h Mon Nov 22 19:48:47 2010 +0100 +++ b/gcc/config/mips/iris.h Thu Nov 25 19:26:52 2010 +0100 @@ -205,6 +205,11 @@ library search directories. */ #define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 1 +/* The SGI linker doesn't understand constructor priorities. */ +#ifndef IRIX_USING_GNU_LD +#define SUPPORTS_INIT_PRIORITY 0 +#endif + /* Add -g to mips.h default to avoid confusing gas with local symbols generated from stabs info. */ #undef NM_FLAGS diff -r 1e22feb8ab1d gcc/configure.ac --- a/gcc/configure.ac Mon Nov 22 19:48:47 2010 +0100 +++ b/gcc/configure.ac Thu Nov 25 19:26:52 2010 +0100 @@ -2992,6 +2992,18 @@ [$tls_first_major,$tls_first_minor,0], [$tls_as_opt], [$conftest_s],, [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 + ;; +esac if test $set_have_as_tls = yes ; then AC_DEFINE(HAVE_AS_TLS, 1, [Define if your assembler supports thread-local storage.]) diff -r 1e22feb8ab1d gcc/testsuite/g++.dg/abi/packed1.C --- a/gcc/testsuite/g++.dg/abi/packed1.C Mon Nov 22 19:48:47 2010 +0100 +++ b/gcc/testsuite/g++.dg/abi/packed1.C Thu Nov 25 19:26:52 2010 +0100 @@ -4,7 +4,7 @@ extern "C" void abort (); -struct INNER { // { dg-warning "inefficient.*vptr" "" { target alpha*-*-* ia64-*-* hppa*-*-* sparc*-*-* sh*-*-* } } +struct INNER { // { dg-warning "inefficient.*vptr" "" { target alpha*-*-* ia64-*-* hppa*-*-* mips-sgi-irix* sparc*-*-* sh*-*-* } } virtual int foo() const { return 1; } } __attribute__ ((packed)); diff -r 1e22feb8ab1d gcc/testsuite/g++.dg/cpp/_Pragma1.C --- a/gcc/testsuite/g++.dg/cpp/_Pragma1.C Mon Nov 22 19:48:47 2010 +0100 +++ b/gcc/testsuite/g++.dg/cpp/_Pragma1.C Thu Nov 25 19:26:52 2010 +0100 @@ -2,7 +2,7 @@ // This is supposed to succeed only if // the target defines HANDLE_PRAGMA_PACK_PUSH_POP // and doesn't define HANDLE_PRAGMA_PACK_WITH_EXPANSION. -// { dg-do compile { target { ! { powerpc-ibm-aix* *-*-solaris2* fido-*-* m68k-*-* sh*-[us]*-elf m32c-*-* *-*-vxworks alpha*-dec-osf* } } } } +// { dg-do compile { target { ! { powerpc-ibm-aix* *-*-solaris2* fido-*-* m68k-*-* mips-sgi-irix* sh*-[us]*-elf m32c-*-* *-*-vxworks alpha*-dec-osf* } } } } #define push bar #define foo _Pragma ("pack(push)") diff -r 1e22feb8ab1d gcc/testsuite/gcc.target/mips/call-3.c --- a/gcc/testsuite/gcc.target/mips/call-3.c Mon Nov 22 19:48:47 2010 +0100 +++ b/gcc/testsuite/gcc.target/mips/call-3.c Thu Nov 25 19:26:52 2010 +0100 @@ -1,5 +1,6 @@ /* { dg-options "-O2 -mrelax-pic-calls -mno-shared" } */ /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,g\n1:\tjalr\t" } } */ +/* { dg-require-visibility "" } */ __attribute__ ((visibility ("hidden"))) void g (); diff -r 1e22feb8ab1d gcc/testsuite/lib/plugin-support.exp --- a/gcc/testsuite/lib/plugin-support.exp Mon Nov 22 19:48:47 2010 +0100 +++ b/gcc/testsuite/lib/plugin-support.exp Thu Nov 25 19:26:52 2010 +0100 @@ -84,7 +84,7 @@ set gcc_objdir "$objdir/../../.." set includes "-I. -I${srcdir} -I${gcc_srcdir}/gcc -I${gcc_objdir}/gcc \ -I${gcc_srcdir}/include -I${gcc_srcdir}/libcpp/include \ - $GMPINC" + $GMPINC -I${gcc_objdir}/intl" set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared" diff -r 1e22feb8ab1d gcc/testsuite/lib/prune.exp --- a/gcc/testsuite/lib/prune.exp Mon Nov 22 19:48:47 2010 +0100 +++ b/gcc/testsuite/lib/prune.exp Thu Nov 25 19:26:52 2010 +0100 @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 1999, 2000, 2002, 2004, 2007, 2008 +# Copyright (C) 1997, 1999, 2000, 2002, 2004, 2007, 2008, 2010 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -37,6 +37,9 @@ regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text + # Ignore second line of IRIX 6 linker multiline message. + regsub -all "(^|\n)\[ \t\]*that might degrade performance on an older version \\(rev. 2.2\\) R4000 processor.\[^\n\]*" $text "" text + # Ignore harmless VTA note. regsub -all "(^|\n)\[^\n\]*: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without\[^\n\]*" $text "" text