[build] Move gthr to toplevel libgcc
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Fri Sep 23 09:23:00 GMT 2011
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
> John David Anglin <dave.anglin@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
2011-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc:
* gthr-posix.h, gthr-single.h, gthr.h: Move to ../libgcc.
* gthr-aix.h: Move to ../libgcc/config/rs6000.
* gthr-dce.h: Move to ../libgcc/config/pa.
* gthr-lynx.h: Move to ../libgcc/config.
* gthr-mipssde.h: Move to ../libgcc/config/mips.
* gthr-rtems.h: Move to ../libgcc/config.
* gthr-tpf.h: Move to ../libgcc/config/s390.
* gthr-vxworks.h: Move to ../libgcc/config.
* gthr-win32.h: Move to ../libgcc/config/i386.
* configure.ac (gthread_flags): Remove
(gthr-default.h): Don't create.
(thread_file): Don't substitute.
* configure: Regenerate.
* Makefile.in (GCC_THREAD_FILE): Remove.
(GTHREAD_FLAGS): Remove.
(libgcc.mvars): Remove GTHREAD_FLAGS.
* 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.
* config/t-vxworks (EXTRA_HEADERS): Remove.
gcc/po:
* EXCLUDES (gthr-aix.h, gthr-dce.h, gthr-posix.c, gthr-posix.h)
(gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h)
(gthr-win32.h, gthr.h): Remove.
libgcc:
* gthr-posix.h, gthr-single.h, gthr.h: New files.
* config/gthr-lynx.h, config/gthr-rtems.h, config/gthr-vxworks.h,
config/i386/gthr-win32.h, config/mips/gthr-mipssde.h,
config/pa/gthr-dce.h, config/rs6000/gthr-aix.h,
config/s390/gthr-tpf.h: New files.
* config/i386/gthr-win32.c: Include "gthr-win32.h".
* config.host (thread_header, thread_dir): New variables.
Set it depending on target_thread_file.
* configure.ac (gthr-default.h): Link from $thread_header.
* configure: Regenerate.
* Makefile.in (LIBGCC2_CFLAGS): Remove $(GTHREAD_FLAGS).
libgfortran:
* Makefile.am (AM_CPPFLAGS): Add
-I$(srcdir)/$(MULTISRCTOP)../libgcc, -I$(MULTIBUILDTOP)../libgcc.
* Makefile.in: Regenerate.
* acinclude.m4 (LIBGFOR_CHECK_GTHR_DEFAULT): Remove.
* configure.ac (LIBGFOR_CHECK_GTHR_DEFAULT): Likewise.
* configure: Regenerate.
* config.h.in: Regenerate.
libobjc:
* Makefile.in (INCLUDES): Add -I$(MULTIBUILDTOP)../libgcc.
* configure.ac (target_thread_file, HAVE_GTHR_DEFAULT): Remove.
* configure: Regenerate.
* config.h.in: Regenerate.
libstdc++-v3:
* acinclude.m4 (GLIBCXX_CONFIGURE): Determine and substitute
toplevel_builddir.
(GLIBCXX_ENABLE_THREADS): Remove glibcxx_thread_h,
HAVE_GTHR_DEFAULT, enable_thread.
(GLIBCXX_CHECK_GTHREADS): Reflect gthr move to libgcc.
* include/Makefile.am (thread_host_headers): Remove
${host_builddir}/gthr-tpf.h.
(${host_builddir}/gthr.h): Reflect gthr move to libgcc.
Use $<.
(${host_builddir}/gthr-single.h): Likewise.
(${host_builddir}/gthr-posix.h): Likewise.
(${host_builddir}/gthr-tpf.h): Remove.
(${host_builddir}/gthr-default.h): Likewise.
* configure, config.h.in: Regenerate.
* Makefile.in, doc/Makefile.in, include/Makefile.in,
libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in,
src/Makefile.intestsuite/Makefile.in: Regenerate.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libgcc-gthr.patch
Type: text/x-patch
Size: 17869 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20110923/7a504d7a/attachment.bin>
-------------- next part --------------
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Libstdc++
mailing list