On 09/23/2011 11:23 AM, Rainer Orth wrote:
Rainer Orth<r...@cebitec.uni-bielefeld.de>  writes:

John David Anglin<dave.ang...@nrc-cnrc.gc.ca>  writes:

I could find no indication that HP-UX 10 supported anything but DCE
threads (especially no POSIX threads), so _REENTRANT being defined must
meant DCE threads, unless I'm mistaken.

_REENTRANT doesn't imply DCE threads.  The reentrant routines were added
to the non threaded version of libc in HP-UX 10 in preparation for the
transition
to POSIX threads in HP-UX 11.  We define _REENTRANT under other
circumstances in pa-hpux10.h as the reentrant routines are needed for
libgfortran,
etc.

One could argue that it's the responsibility of libgfortran to do so if
necessary, though.

But ok, I'll restore the definition and use of _DCE_THREADS in
pa-hpux10.h and gthr-dce.h.

Here's the updated patch with that change.  I haven't yet rebased it
to current mainline (will do so for the whole patch series over the
weekend), and it still requires the previous libgcc patches to apply
cleanly.

        Rainer

Ok with a couple of changes:

        gcc:
        * gthr-posix.h, gthr-single.h, gthr.h: Move to ../libgcc.

Move gthr-posix.h to config/

       * config/m32r/linux.h (SUBTARGET_CPP_SPEC): Don't define _PTHREADS
       if -pthread.
       * config/mn10300/linux.h (CPP_SPEC): Likewise.
       * config/netbsd.h (NETBSD_CPP_SPEC): Likewise.
       * config/sh/linux.h (SUBTARGET_CPP_SPEC): Likewise.
       * config/sol2.h (CPP_SUBTARGET_SPEC): Likewise.

Don't commit these, not yet at least (well, for Solaris it's your choice).

        * config.host (thread_header, thread_dir): New variables.
        Set it depending on target_thread_file.

Move to configure.ac, and remove the indirection on thread_dir (i.e. just set thread_header).

Paolo

Reply via email to