bootstrap failure with pthreads on solaris-2.6

Loren James Rittle rittle@latour.rsch.comm.mot.com
Tue Oct 23 16:22:00 GMT 2001


In article < 3BD541E5.72AB5F1E@pop.agri.ch >,
Andreas Tobler <toa@pop.agri.ch> writes:

> 2001-10-16  Loren J. Rittle  <ljrittle@acm.org>

>         * include/gc_pthread_redirects.h: Generalize test to use GC_PTHREADS.
>         * linux_threads.c (WRAP_FUNC(pthread_join)): Conditionalized on
>         GC_FREEBSD_THREADS, handle strange interaction between system
>         pthread implementation and boehm-gc signal-handler architecture.
>         * tests/test.c (main): Conditionalized on GC_FREEBSD_THREADS,
>         set stack.
>         * include/private/gcconfig.h (configuration keyed off FREEBSD):
>         Define SIG_SUSPEND, SIG_THR_RESTART.  Do not define
>         MPROTECT_VDB when GC_FREEBSD_THREADS is defined.

> first off, I don't have a clue about what's the correct solution. On
> solaris-2.6 the bootstrap failed in solaris_pthreads.c
> telling GC_thread was not declared.

Hi Andreas,

For the record, the bug you found existed before my patch.  (I have
access to Solaris 2.7 machines and I too see the same problem with and
without my patch that you referenced when I configure just
gcc-mainline/boehm-gc against gcc 3.0).  You might note that a new
version of the boehm-gc code was imported hours before my patch.  The
ChangeLog itself doesn't exactly make the situation clear.

> A quick hack in private/solaris_threads.h brought it at least to
> compile. I defined the top line to:
> #ifdef GC_SOLARIS_PTHREADS iso. SOLARIS_THREADS. 
> I guess this is not correct, but could anyone have a look at?

All macro guards in boehm-gc of the form X_THREADS were suppose to be
converted to GC_X_THREADS thus your patch is correct.  I have
installed this patch as obvious (note that it is subtly different than
your proposal).

However, 'make check' still fails.  I have no idea when it last worked
in the threaded configuration on Solaris.

Regards,
Loren

2001-10-23  Loren J. Rittle  <ljrittle@acm.org>
            Andreas Tobler <toa@pop.agri.ch>

        * include/private/solaris_threads.h: Update to use GC_SOLARIS_THREADS.

Index: include/private/solaris_threads.h
===================================================================
RCS file: /cvs/gcc/egcs/boehm-gc/include/private/solaris_threads.h,v
retrieving revision 1.2
diff -c -r1.2 solaris_threads.h
*** solaris_threads.h	2001/08/17 18:30:50	1.2
--- solaris_threads.h	2001/10/23 23:18:42
***************
*** 1,4 ****
! #ifdef SOLARIS_THREADS
  
  /* The set of all known threads.  We intercept thread creation and     */
  /* joins.  We never actually create detached threads.  We allocate all */
--- 1,4 ----
! #ifdef GC_SOLARIS_THREADS
  
  /* The set of all known threads.  We intercept thread creation and     */
  /* joins.  We never actually create detached threads.  We allocate all */
***************
*** 30,34 ****
    extern size_t GC_page_sz;
    extern void GC_thr_init(void);
  
! # endif /* SOLARIS_THREADS */
  
--- 30,34 ----
    extern size_t GC_page_sz;
    extern void GC_thr_init(void);
  
! # endif /* GC_SOLARIS_THREADS */
  



More information about the Gcc-patches mailing list