Disable GC_register_my_thread and GC_unregister_my_thread on NetBSD as

the version of boehm-gc bundled with gcc does not support NetBSD threads.
This commit is contained in:
sbd 2012-04-30 09:12:28 +00:00
parent ed7dbf8cd9
commit 2eecd30946
2 changed files with 29 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.3 2012/04/27 04:53:02 sbd Exp $
$NetBSD: distinfo,v 1.4 2012/04/30 09:12:28 sbd Exp $
SHA1 (ecj-4.5.jar) = 58c1d79c64c8cd718550f32a932ccfde8d1e6449
RMD160 (ecj-4.5.jar) = d3f4da657f086b6423f74e93f001132f4855368a
@ -14,5 +14,6 @@ SHA1 (patch-gcc_gcc.c) = f23ddf1ad4decd086dd41a70046b4a870a39516f
SHA1 (patch-gcc_ginclude_stddef.h) = 635e3e7579e9395fa017ac38e8b768d98937a80e
SHA1 (patch-libgfortran_configure) = b3bbc7d9201073a1bed0b7e10141465bab52c8be
SHA1 (patch-libgo_Makefile.in) = c06e3f0deb9f906d2c158262cffdc3fb7af95602
SHA1 (patch-libjava_boehm.cc) = b18bc9d410a62543583c77e011f50b86f41ca18a
SHA1 (patch-libjava_configure) = 48ea2baffe87e09dda8133d286bd9b1bfe4c3f8a
SHA1 (patch-libjava_contrib_rebuild-gcj-db.in) = bb01d738fc7db05046ae37e8ade32574de1d8297

View file

@ -0,0 +1,27 @@
$NetBSD: patch-libjava_boehm.cc,v 1.1 2012/04/30 09:12:28 sbd Exp $
Disable GC_register_my_thread and GC_unregister_my_thread on NetBSD as
the version of boehm-gc bundled with gcc does not support NetBSD threads.
--- libjava/boehm.cc.orig 2007-10-22 21:24:35.000000000 +0000
+++ libjava/boehm.cc
@@ -747,7 +747,8 @@ _Jv_GCAttachThread ()
// The registration interface is only defined on posixy systems and
// only actually works if pthread_getattr_np is defined.
// FIXME: until gc7 it is simpler to disable this on solaris.
-#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS)
+#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS) \
+ && !defined(__NetBSD__)
GC_register_my_thread ();
#endif
}
@@ -755,7 +756,8 @@ _Jv_GCAttachThread ()
void
_Jv_GCDetachThread ()
{
-#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS)
+#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS) \
+ && !defined(__NetBSD__)
GC_unregister_my_thread ();
#endif
}