diff mbox

[4.5,testsuite] Backports of several IRIX testsuite fixes

Message ID ydd39qptfkb.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Nov. 25, 2010, 6:37 p.m. UTC
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  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	Backport from mainline:
	2010-11-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* config/mips/iris6.h [!IRIX_USING_GNU_LD]
	(SUPPORTS_INIT_PRIORITY): Define.

	2010-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* configure.ac (*-*-irix6*): Disable set_have_as_tls.
	(*-*-osf*): Likewise.
	* configure: Regenerate.

	gcc/testsuite:
	Backport from mainline:
	2010-11-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* 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  <iains@gcc.gnu.org>

	PR testsuite/43925
	* lib/plugin-support.exp (plugin-test-execute):
	Add ${gcc_objdir}/intl to includes.

	fixincludes:
	2010-11-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* inclhack.def (irix_pthread_init): New fix.
	* fixincl.x: Regenerate.
	* tests/base/pthread.h [IRIX_PTHREAD_INIT_CHECK]: New test.
diff mbox

Patch

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
+ *  <pthread.h>.
+ */
+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] <sys/socket.h> 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