From 975147a4a4a970261d30905dcf7e3fd683ce119f Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 14 Sep 2006 18:06:04 +0000 Subject: [PATCH] re PR boehm-gc/29068 (Bootstrap fails building libjava on SPARC/Solaris) libjava PR boehm-gc/29068: * boehm.cc (_Jv_GCAttachThread): Disable on Solaris. (_Jv_GCDetachThread): Likewise. boehm-gc PR boehm-gc/29068. * misc.c (GC_init_inner): Don't use GC_get_thread_stack_base on Solaris. From-SVN: r116948 --- boehm-gc/ChangeLog | 6 ++++++ boehm-gc/misc.c | 2 +- libjava/ChangeLog | 6 ++++++ libjava/boehm.cc | 5 +++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index 70dcfb0d9d4..bf4f0cd1a6c 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,9 @@ +2006-09-14 Tom Tromey + + PR boehm-gc/29068. + * misc.c (GC_init_inner): Don't use GC_get_thread_stack_base on + Solaris. + 2006-08-21 Bryce McKinlay PR libgcj/13212: diff --git a/boehm-gc/misc.c b/boehm-gc/misc.c index 23e226df52a..069c7d57ad0 100644 --- a/boehm-gc/misc.c +++ b/boehm-gc/misc.c @@ -674,7 +674,7 @@ void GC_init_inner() # if !defined(THREADS) || defined(GC_PTHREADS) || defined(GC_WIN32_THREADS) \ || defined(GC_SOLARIS_THREADS) if (GC_stackbottom == 0) { - # ifdef GC_PTHREADS + # if defined(GC_PTHREADS) && ! defined(GC_SOLARIS_THREADS) /* Use thread_stack_base if available, as GC could be initialized from a thread that is not the "main" thread. */ GC_stackbottom = GC_get_thread_stack_base(); diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 989738f5763..a4c80c9c3d2 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2006-09-14 Tom Tromey + + PR boehm-gc/29068: + * boehm.cc (_Jv_GCAttachThread): Disable on Solaris. + (_Jv_GCDetachThread): Likewise. + 2006-09-14 Andreas Schwab * posix-threads.cc: Include "posix.h". diff --git a/libjava/boehm.cc b/libjava/boehm.cc index f96128e191d..2e382959ee4 100644 --- a/libjava/boehm.cc +++ b/libjava/boehm.cc @@ -701,7 +701,8 @@ _Jv_GCAttachThread () { // The registration interface is only defined on posixy systems and // only actually works if pthread_getattr_np is defined. -#ifdef HAVE_PTHREAD_GETATTR_NP + // FIXME: until gc7 it is simpler to disable this on solaris. +#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS) GC_register_my_thread (); #endif } @@ -709,7 +710,7 @@ _Jv_GCAttachThread () void _Jv_GCDetachThread () { -#ifdef HAVE_PTHREAD_GETATTR_NP +#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS) GC_unregister_my_thread (); #endif }