Patchwork [4.4/4.5,testsuite] Backports to improve IRIX 6/Tru64 UNIX testresults

login
register
mail settings
Submitter Rainer Orth
Date Dec. 6, 2010, 4:37 p.m.
Message ID <ydd62v6c0x0.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/74388/
State New
Headers show

Comments

Rainer Orth - Dec. 6, 2010, 4:37 p.m.
Unfortunately, nobody cared to review the testsuite patch backports
submitted in

	[4.5, testsuite] Backports of several IRIX testsuite fixes
        http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02554.html
and
        [4.5, testsuite] Backport several Tru64 UNIX testsuite fixes
        http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02557.html

I've now committed the parts that didn't require approval, but a few
changes are still missing.

Since we still don't have a testsuite maintainer, could some global
reviewer either review the patch or tell me that it's ok to backport
testsuite-only changes after appropriate testing?

Bootstrapped on alpha-dec-osf4.0f, alpha-dec-osf5.1b and
mips-sgi-irix6.5 without regressions.

Ok for the 4.5 branch and the 4.4 branch after testing?

Thanks.
        Rainer


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

	gcc/testsuite:
	Backport from mainline:
	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.

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

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

	* doc/sourcebuild.texi (Add Options): Document tls.

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

	* lib/target-supports.exp (add_options_for_tls): New proc.
	* g++.dg/tls/static-1.C: Use dg-add-options tls.
	* g++.dg/tls/static-1a.cc: Likewise.
	* gcc.dg/tls/emutls-1.c: Likewise.
	* gcc.dg/tls/opt-11.c: Likewise.
	* gcc.dg/tls/opt-12.c: Likewise.
	* gcc.dg/tls/pr24428-2.c: Likewise.
	* gcc.dg/tls/pr24428.c: Likewise.

iff -r 1e22feb8ab1d gcc/testsuite/lib/plugin-support.exp
Richard Guenther - Dec. 6, 2010, 5:10 p.m.
On Mon, 6 Dec 2010, Rainer Orth wrote:

> Unfortunately, nobody cared to review the testsuite patch backports
> submitted in
> 
> 	[4.5, testsuite] Backports of several IRIX testsuite fixes
>         http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02554.html
> and
>         [4.5, testsuite] Backport several Tru64 UNIX testsuite fixes
>         http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02557.html
> 
> I've now committed the parts that didn't require approval, but a few
> changes are still missing.
> 
> Since we still don't have a testsuite maintainer, could some global
> reviewer either review the patch or tell me that it's ok to backport
> testsuite-only changes after appropriate testing?
> 
> Bootstrapped on alpha-dec-osf4.0f, alpha-dec-osf5.1b and
> mips-sgi-irix6.5 without regressions.
> 
> Ok for the 4.5 branch and the 4.4 branch after testing?

Ok.

Thanks,
Richard.

> Thanks.
>         Rainer
> 
> 
> 2010-11-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	gcc/testsuite:
> 	Backport from mainline:
> 	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.
> 
> 2010-11-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	gcc:
> 	Backport from mainline:
> 	2010-07-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* doc/sourcebuild.texi (Add Options): Document tls.
> 
> 	gcc/testsuite:
> 	Backport from mainline:
> 	2010-07-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* lib/target-supports.exp (add_options_for_tls): New proc.
> 	* g++.dg/tls/static-1.C: Use dg-add-options tls.
> 	* g++.dg/tls/static-1a.cc: Likewise.
> 	* gcc.dg/tls/emutls-1.c: Likewise.
> 	* gcc.dg/tls/opt-11.c: Likewise.
> 	* gcc.dg/tls/opt-12.c: Likewise.
> 	* gcc.dg/tls/pr24428-2.c: Likewise.
> 	* gcc.dg/tls/pr24428.c: Likewise.
> 
> iff -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 1b55ce8ede18 gcc/doc/sourcebuild.texi
> --- a/gcc/doc/sourcebuild.texi	Mon Nov 22 19:44:14 2010 +0100
> +++ b/gcc/doc/sourcebuild.texi	Thu Nov 25 19:41:55 2010 +0100
> @@ -1892,6 +1892,9 @@
>  @item mips16_attribute
>  @code{mips16} function attributes.
>  Only MIPS targets support this feature, and only then in certain modes.
> +
> +@item tls
> +Add the target-specific flags needed to use thread-local storage.
>  @end table
>  
>  @node Require Support
> diff -r 1b55ce8ede18 gcc/testsuite/g++.dg/tls/static-1.C
> --- a/gcc/testsuite/g++.dg/tls/static-1.C	Mon Nov 22 19:44:14 2010 +0100
> +++ b/gcc/testsuite/g++.dg/tls/static-1.C	Thu Nov 25 19:41:55 2010 +0100
> @@ -1,6 +1,7 @@
>  // { dg-do run }
>  // { dg-options "-O2" }
>  // { dg-require-effective-target tls_runtime }
> +// { dg-add-options tls }
>  // { dg-additional-sources "static-1a.cc" }
>  
>  extern "C" void abort ();
> diff -r 1b55ce8ede18 gcc/testsuite/g++.dg/tls/static-1a.cc
> --- a/gcc/testsuite/g++.dg/tls/static-1a.cc	Mon Nov 22 19:44:14 2010 +0100
> +++ b/gcc/testsuite/g++.dg/tls/static-1a.cc	Thu Nov 25 19:41:55 2010 +0100
> @@ -1,6 +1,7 @@
>  // { dg-do run }
>  // { dg-options "-O2" }
>  // { dg-require-effective-target tls_runtime }
> +// { dg-add-options tls }
>  // { dg-additional-sources "static-1a.cc" }
>  
>  struct A
> diff -r 1b55ce8ede18 gcc/testsuite/gcc.dg/tls/emutls-1.c
> --- a/gcc/testsuite/gcc.dg/tls/emutls-1.c	Mon Nov 22 19:44:14 2010 +0100
> +++ b/gcc/testsuite/gcc.dg/tls/emutls-1.c	Thu Nov 25 19:41:55 2010 +0100
> @@ -1,5 +1,6 @@
>  /* { dg-do run { target *-wrs-vxworks } } */
>  /* { dg-require-effective-target tls } */
> +/* { dg-add-options tls } */
>  
>  /* vxworks' TLS model requires no extra padding on the tls proxy
>     objects.  */
> diff -r 1b55ce8ede18 gcc/testsuite/gcc.dg/tls/opt-11.c
> --- a/gcc/testsuite/gcc.dg/tls/opt-11.c	Mon Nov 22 19:44:14 2010 +0100
> +++ b/gcc/testsuite/gcc.dg/tls/opt-11.c	Thu Nov 25 19:41:55 2010 +0100
> @@ -1,5 +1,6 @@
>  /* { dg-do run } */
>  /* { dg-require-effective-target tls_runtime } */
> +/* { dg-add-options tls } */
>  
>  extern void abort (void);
>  extern void *memset (void *, int, __SIZE_TYPE__);
> diff -r 1b55ce8ede18 gcc/testsuite/gcc.dg/tls/opt-12.c
> --- a/gcc/testsuite/gcc.dg/tls/opt-12.c	Mon Nov 22 19:44:14 2010 +0100
> +++ b/gcc/testsuite/gcc.dg/tls/opt-12.c	Thu Nov 25 19:41:55 2010 +0100
> @@ -2,6 +2,7 @@
>  /* { dg-do run } */
>  /* { dg-options "-O2 -fpic" } */
>  /* { dg-require-effective-target tls_runtime } */
> +/* { dg-add-options tls } */
>  /* { dg-require-effective-target fpic } */
>  
>  extern void abort (void);
> diff -r 1b55ce8ede18 gcc/testsuite/gcc.dg/tls/pr24428-2.c
> --- a/gcc/testsuite/gcc.dg/tls/pr24428-2.c	Mon Nov 22 19:44:14 2010 +0100
> +++ b/gcc/testsuite/gcc.dg/tls/pr24428-2.c	Thu Nov 25 19:41:55 2010 +0100
> @@ -1,6 +1,7 @@
>  /* { dg-do run } */
>  /* { dg-options "-O2" } */
>  /* { dg-require-effective-target tls_runtime } */
> +/* { dg-add-options tls } */
>  
>  __thread double thrtest[81];
>  int main ()
> diff -r 1b55ce8ede18 gcc/testsuite/gcc.dg/tls/pr24428.c
> --- a/gcc/testsuite/gcc.dg/tls/pr24428.c	Mon Nov 22 19:44:14 2010 +0100
> +++ b/gcc/testsuite/gcc.dg/tls/pr24428.c	Thu Nov 25 19:41:55 2010 +0100
> @@ -1,6 +1,7 @@
>  /* { dg-do run } */
>  /* { dg-options "-O2" } */
>  /* { dg-require-effective-target tls_runtime } */
> +/* { dg-add-options tls } */
>  
>  __thread double thrtest[81];
>  int main ()
> diff -r 1b55ce8ede18 gcc/testsuite/lib/target-supports.exp
> --- a/gcc/testsuite/lib/target-supports.exp	Mon Nov 22 19:44:14 2010 +0100
> +++ b/gcc/testsuite/lib/target-supports.exp	Thu Nov 25 19:41:55 2010 +0100
> @@ -569,6 +569,17 @@
>      }]
>  }
>  
> +# Add to FLAGS all the target-specific flags needed to use thread-local storage.
> +
> +proc add_options_for_tls { flags } {
> +    # Tru64 UNIX uses emutls, which relies on a couple of pthread functions
> +    # which only live in libpthread, so always pass -pthread for TLS.
> +    if { [istarget *-*-osf*] } {
> +	return "$flags -pthread"
> +    }
> +    return $flags
> +}
> +
>  # Return 1 if thread local storage (TLS) is supported, 0 otherwise.
>  
>  proc check_effective_target_tls {} {
> 
> 
>

Patch

--- 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 1b55ce8ede18 gcc/doc/sourcebuild.texi
--- a/gcc/doc/sourcebuild.texi	Mon Nov 22 19:44:14 2010 +0100
+++ b/gcc/doc/sourcebuild.texi	Thu Nov 25 19:41:55 2010 +0100
@@ -1892,6 +1892,9 @@ 
 @item mips16_attribute
 @code{mips16} function attributes.
 Only MIPS targets support this feature, and only then in certain modes.
+
+@item tls
+Add the target-specific flags needed to use thread-local storage.
 @end table
 
 @node Require Support
diff -r 1b55ce8ede18 gcc/testsuite/g++.dg/tls/static-1.C
--- a/gcc/testsuite/g++.dg/tls/static-1.C	Mon Nov 22 19:44:14 2010 +0100
+++ b/gcc/testsuite/g++.dg/tls/static-1.C	Thu Nov 25 19:41:55 2010 +0100
@@ -1,6 +1,7 @@ 
 // { dg-do run }
 // { dg-options "-O2" }
 // { dg-require-effective-target tls_runtime }
+// { dg-add-options tls }
 // { dg-additional-sources "static-1a.cc" }
 
 extern "C" void abort ();
diff -r 1b55ce8ede18 gcc/testsuite/g++.dg/tls/static-1a.cc
--- a/gcc/testsuite/g++.dg/tls/static-1a.cc	Mon Nov 22 19:44:14 2010 +0100
+++ b/gcc/testsuite/g++.dg/tls/static-1a.cc	Thu Nov 25 19:41:55 2010 +0100
@@ -1,6 +1,7 @@ 
 // { dg-do run }
 // { dg-options "-O2" }
 // { dg-require-effective-target tls_runtime }
+// { dg-add-options tls }
 // { dg-additional-sources "static-1a.cc" }
 
 struct A
diff -r 1b55ce8ede18 gcc/testsuite/gcc.dg/tls/emutls-1.c
--- a/gcc/testsuite/gcc.dg/tls/emutls-1.c	Mon Nov 22 19:44:14 2010 +0100
+++ b/gcc/testsuite/gcc.dg/tls/emutls-1.c	Thu Nov 25 19:41:55 2010 +0100
@@ -1,5 +1,6 @@ 
 /* { dg-do run { target *-wrs-vxworks } } */
 /* { dg-require-effective-target tls } */
+/* { dg-add-options tls } */
 
 /* vxworks' TLS model requires no extra padding on the tls proxy
    objects.  */
diff -r 1b55ce8ede18 gcc/testsuite/gcc.dg/tls/opt-11.c
--- a/gcc/testsuite/gcc.dg/tls/opt-11.c	Mon Nov 22 19:44:14 2010 +0100
+++ b/gcc/testsuite/gcc.dg/tls/opt-11.c	Thu Nov 25 19:41:55 2010 +0100
@@ -1,5 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target tls_runtime } */
+/* { dg-add-options tls } */
 
 extern void abort (void);
 extern void *memset (void *, int, __SIZE_TYPE__);
diff -r 1b55ce8ede18 gcc/testsuite/gcc.dg/tls/opt-12.c
--- a/gcc/testsuite/gcc.dg/tls/opt-12.c	Mon Nov 22 19:44:14 2010 +0100
+++ b/gcc/testsuite/gcc.dg/tls/opt-12.c	Thu Nov 25 19:41:55 2010 +0100
@@ -2,6 +2,7 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -fpic" } */
 /* { dg-require-effective-target tls_runtime } */
+/* { dg-add-options tls } */
 /* { dg-require-effective-target fpic } */
 
 extern void abort (void);
diff -r 1b55ce8ede18 gcc/testsuite/gcc.dg/tls/pr24428-2.c
--- a/gcc/testsuite/gcc.dg/tls/pr24428-2.c	Mon Nov 22 19:44:14 2010 +0100
+++ b/gcc/testsuite/gcc.dg/tls/pr24428-2.c	Thu Nov 25 19:41:55 2010 +0100
@@ -1,6 +1,7 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2" } */
 /* { dg-require-effective-target tls_runtime } */
+/* { dg-add-options tls } */
 
 __thread double thrtest[81];
 int main ()
diff -r 1b55ce8ede18 gcc/testsuite/gcc.dg/tls/pr24428.c
--- a/gcc/testsuite/gcc.dg/tls/pr24428.c	Mon Nov 22 19:44:14 2010 +0100
+++ b/gcc/testsuite/gcc.dg/tls/pr24428.c	Thu Nov 25 19:41:55 2010 +0100
@@ -1,6 +1,7 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2" } */
 /* { dg-require-effective-target tls_runtime } */
+/* { dg-add-options tls } */
 
 __thread double thrtest[81];
 int main ()
diff -r 1b55ce8ede18 gcc/testsuite/lib/target-supports.exp
--- a/gcc/testsuite/lib/target-supports.exp	Mon Nov 22 19:44:14 2010 +0100
+++ b/gcc/testsuite/lib/target-supports.exp	Thu Nov 25 19:41:55 2010 +0100
@@ -569,6 +569,17 @@ 
     }]
 }
 
+# Add to FLAGS all the target-specific flags needed to use thread-local storage.
+
+proc add_options_for_tls { flags } {
+    # Tru64 UNIX uses emutls, which relies on a couple of pthread functions
+    # which only live in libpthread, so always pass -pthread for TLS.
+    if { [istarget *-*-osf*] } {
+	return "$flags -pthread"
+    }
+    return $flags
+}
+
 # Return 1 if thread local storage (TLS) is supported, 0 otherwise.
 
 proc check_effective_target_tls {} {