aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2011-11-10 17:15:33 +0000
committerRainer Orth <ro@gcc.gnu.org>2011-11-10 17:15:33 +0000
commit8851b42977a7c8443e59037733f4b134224964e6 (patch)
tree6ddb9d0712828bdab643952423e5c1d07f00faa7
parentd4b179020b094a0106a96c288e545be220d4a742 (diff)
downloadgcc-8851b42977a7c8443e59037733f4b134224964e6.zip
gcc-8851b42977a7c8443e59037733f4b134224964e6.tar.gz
gcc-8851b42977a7c8443e59037733f4b134224964e6.tar.bz2
libitm port to Tru64 UNIX
* config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use .hidden. (.note.GNU-stack): Only use if __linux__. * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function. * testsuite/libitm.c/notx.c: Use dg-options "-pthread". * testsuite/libitm.c/reentrant.c: Likewise. * testsuite/libitm.c/simple-2.c: Likewise. * testsuite/libitm.c/txrelease.c: Likewise. * testsuite/libitm.c++/static_ctor.C: Likewise. From-SVN: r181262
-rw-r--r--libitm/ChangeLog12
-rw-r--r--libitm/alloc_cpp.cc8
-rw-r--r--libitm/config/alpha/sjlj.S4
-rw-r--r--libitm/testsuite/libitm.c++/static_ctor.C1
-rw-r--r--libitm/testsuite/libitm.c/notx.c3
-rw-r--r--libitm/testsuite/libitm.c/reentrant.c1
-rw-r--r--libitm/testsuite/libitm.c/simple-2.c2
-rw-r--r--libitm/testsuite/libitm.c/txrelease.c2
8 files changed, 33 insertions, 0 deletions
diff --git a/libitm/ChangeLog b/libitm/ChangeLog
index 4fb699e..46c984e 100644
--- a/libitm/ChangeLog
+++ b/libitm/ChangeLog
@@ -1,3 +1,15 @@
+2011-11-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
+ .hidden.
+ (.note.GNU-stack): Only use if __linux__.
+ * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
+ * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
+ * testsuite/libitm.c/reentrant.c: Likewise.
+ * testsuite/libitm.c/simple-2.c: Likewise.
+ * testsuite/libitm.c/txrelease.c: Likewise.
+ * testsuite/libitm.c++/static_ctor.C: Likewise.
+
2011-11-10 Richard Henderson <rth@redhat.com>
* config/x86/x86_avx.cc: Remove #undef __AVX__ hack. Tidy comments.
diff --git a/libitm/alloc_cpp.cc b/libitm/alloc_cpp.cc
index 59d8b73..4e53551 100644
--- a/libitm/alloc_cpp.cc
+++ b/libitm/alloc_cpp.cc
@@ -60,6 +60,14 @@ extern void _ZdlPvRKSt9nothrow_t (void *, c_nothrow_p) __attribute__((weak));
extern void *_ZnaXRKSt9nothrow_t (size_t, c_nothrow_p) __attribute__((weak));
extern void _ZdaPvRKSt9nothrow_t (void *, c_nothrow_p) __attribute__((weak));
+#ifdef __osf__ /* Really: !HAVE_WEAKDEF */
+void *
+_ZnaXRKSt9nothrow_t (size_t, c_nothrow_p)
+{
+ return NULL;
+}
+#endif /* __osf__ */
+
/* Wrap the delete nothrow symbols for usage with a single argument.
Perhaps should have a configure type check for this, because the
std::nothrow_t reference argument is unused (empty class), and most
diff --git a/libitm/config/alpha/sjlj.S b/libitm/config/alpha/sjlj.S
index d60a82d..3aa5f06 100644
--- a/libitm/config/alpha/sjlj.S
+++ b/libitm/config/alpha/sjlj.S
@@ -74,7 +74,9 @@ _ITM_beginTransaction:
.align 4
.globl GTM_longjmp
+#ifdef __ELF__
.hidden GTM_longjmp
+#endif
.ent GTM_longjmp
GTM_longjmp:
@@ -105,4 +107,6 @@ GTM_longjmp:
ret
.end GTM_longjmp
+#ifdef __linux__
.section .note.GNU-stack, "", @progbits
+#endif
diff --git a/libitm/testsuite/libitm.c++/static_ctor.C b/libitm/testsuite/libitm.c++/static_ctor.C
index 1ba7516..18f95fc 100644
--- a/libitm/testsuite/libitm.c++/static_ctor.C
+++ b/libitm/testsuite/libitm.c++/static_ctor.C
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-options "-pthread" } */
/* { dg-xfail-if "" { *-*-* } { "*" } { "" } } */
/* Tests static constructors inside of transactional code. */
diff --git a/libitm/testsuite/libitm.c/notx.c b/libitm/testsuite/libitm.c/notx.c
index 999da02..7ca6580 100644
--- a/libitm/testsuite/libitm.c/notx.c
+++ b/libitm/testsuite/libitm.c/notx.c
@@ -1,5 +1,8 @@
/* These tests all check whether initialization happens properly even if no
transaction has been used in the current thread yet. */
+
+/* { dg-options "-pthread" } */
+
#include <stdlib.h>
#include <pthread.h>
#include <libitm.h>
diff --git a/libitm/testsuite/libitm.c/reentrant.c b/libitm/testsuite/libitm.c/reentrant.c
index 007bbaa..451530a 100644
--- a/libitm/testsuite/libitm.c/reentrant.c
+++ b/libitm/testsuite/libitm.c/reentrant.c
@@ -1,4 +1,5 @@
/* { dg-do run { xfail *-*-* } }
+/* { dg-options "-pthread" } */
/* Tests that new transactions can be started from both transaction_pure and
transaction_unsafe code. This also requires proper handling of reentrant
diff --git a/libitm/testsuite/libitm.c/simple-2.c b/libitm/testsuite/libitm.c/simple-2.c
index e92c917..c77d75d 100644
--- a/libitm/testsuite/libitm.c/simple-2.c
+++ b/libitm/testsuite/libitm.c/simple-2.c
@@ -1,5 +1,7 @@
/* Simplest test involving real threads. Verify we get the correct answer. */
+/* { dg-options "-pthread" } */
+
#include <stdlib.h>
#include <pthread.h>
diff --git a/libitm/testsuite/libitm.c/txrelease.c b/libitm/testsuite/libitm.c/txrelease.c
index 7bf0434..37d6b2c 100644
--- a/libitm/testsuite/libitm.c/txrelease.c
+++ b/libitm/testsuite/libitm.c/txrelease.c
@@ -2,6 +2,8 @@
transaction data when a thread exists, potentially repeatedly. However,
we currently cannot check whether the data has indeed been released. */
+/* { dg-options "-pthread" } */
+
#include <stddef.h>
#include <stdlib.h>
#include <pthread.h>