This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Dejagnu fixes for TLS on AIX
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Mike Stump <mikestump at comcast dot net>
- Date: Wed, 31 Dec 2014 11:44:23 -0500
- Subject: [PATCH] Dejagnu fixes for TLS on AIX
- Authentication-results: sourceware.org; auth=none
On AIX, GCC needs to build a multilib for AIX. When testing in tree,
the Dejagnu infrastructure adds linking options for the default,
non-pthread multilib. This causes failures for the G++ TLS tests.
The following patch uses the existing add_options_for_tls
infrastructure to adjust the flags to prepend the pthread multilib
before the other options. The patch also XFAILs three assembler tests
on AIX. This fixes all of the TLS tests on AIX.
Is the Dejagnu library change okay?
Bootstrapped on powerpc-ibm-aix7.1.2.0
Thanks, David
* lib/target-support.exp (add_options_for_tls): Prepend pthread link flags.
* g++.dg/tls/thread_local1.C: XFAIL on AIX.
* g++.dg/tls/thread_local7.C: Same.
* g++.dg/tls/thread_local7g.C: Same.
Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp (revision 219126)
+++ lib/target-supports.exp (working copy)
@@ -596,7 +596,7 @@
int f (void) { return i; }
void g (int j) { i = j; }
}] } {
- return "$flags -pthread"
+ return "-pthread [g++_link_flags [get_multilibs "-pthread"] ] $flags "
}
return $flags
}
Index: g++.dg/tls/thread_local1.C
===================================================================
--- g++.dg/tls/thread_local1.C (revision 219126)
+++ g++.dg/tls/thread_local1.C (working copy)
@@ -7,7 +7,7 @@
// simultaneous execution.
// { dg-final { scan-assembler-not "cxa_guard" } }
// The guard should be TLS, not local common.
-// { dg-final { scan-assembler-not "\.comm" } }
+// { dg-final { scan-assembler-not "\.comm" { xfail powerpc-*-aix* } } }
struct A
{
Index: g++.dg/tls/thread_local7.C
===================================================================
--- g++.dg/tls/thread_local7.C (revision 219126)
+++ g++.dg/tls/thread_local7.C (working copy)
@@ -2,7 +2,7 @@
// { dg-require-effective-target tls }
// The reference temp should be TLS, not normal data.
-// { dg-final { scan-assembler-not "\\.data" { target tls_native } } }
+// { dg-final { scan-assembler-not "\\.data" { target tls_native
xfail powerpc-*-aix* } } }
void f()
{
Index: g++.dg/tls/thread_local7g.C
===================================================================
--- g++.dg/tls/thread_local7g.C (revision 219126)
+++ g++.dg/tls/thread_local7g.C (working copy)
@@ -2,7 +2,7 @@
// { dg-require-effective-target tls }
// The reference temp should be TLS, not normal data.
-// { dg-final { scan-assembler-not "\\.data" { target tls_native } } }
+// { dg-final { scan-assembler-not "\\.data" { target tls_native
xfail powerpc-*-aix* } } }
thread_local int&& ir = 42;