We still have support for --enable-threads=solaris (the old Unix International thread library) in GCC. This is pretty pointless IMO:
* Both libthread and libpthread are only two different interfaces to the same implementation. * Most of our runtime libraries don't support libthread at all. * The support is barely tested if at all, and has created user confusion who assumed that they should configure with --enable-threads=solaris when building on Solaris. I've already clarified install.texi to avoid this. The following patch removes (hopefully) all remnants of that support, both in code and docs. Tested by a i386-pc-solaris2.11 bootstrap without regressions and verifying that a --enable-threads=solaris runs into the expected error configuring gcc. Will apply to mainline soon. Rainer 2011-03-20 Rainer Orth <r...@cebitec.uni-bielefeld.de> gcc: * gthr-solaris.h: Remove. * gthr.h (_SOLARIS_THREADS): Don't include gthr-solaris.h, remove. * config/sol2.h (CPP_SUBTARGET_SPEC): Remove -threads support. (LIB_SPEC): Likewise. * config/sol2.opt (threads): Remove. * config.gcc (i[34567]86-*-solaris2*): Remove solaris threads support. (sparc*-*-solaris2*): Likewise. * configure.ac (enable_threads): Enable solaris support. * configure: Regenerate. * doc/invoke.texi (Option Summary, Solaris 2 Options): Remove -threads. * doc/install.texi (Configuration, --enable-threads=lib): Remove solaris. boehm-gc: * configure.ac (THREADS): Remove solaris. * configure: Regenerate. libjava: * configure.ac (THREADS): Remove solaris. * configure: Regenerate. diff -r 5ba1687bfdfd boehm-gc/configure.ac --- a/boehm-gc/configure.ac Sun Mar 20 21:48:36 2011 +0100 +++ b/boehm-gc/configure.ac Sun Mar 20 22:14:54 2011 +0100 @@ -235,7 +235,7 @@ AC_DEFINE(GC_AIX_THREADS,1) AC_DEFINE(_REENTRANT,1) ;; - decosf1 | irix | mach | os2 | solaris | dce | vxworks) + decosf1 | irix | mach | os2 | dce | vxworks) AC_MSG_ERROR(thread package $THREADS not yet supported) ;; *) diff -r 5ba1687bfdfd gcc/config.gcc --- a/gcc/config.gcc Sun Mar 20 21:48:36 2011 +0100 +++ b/gcc/config.gcc Sun Mar 20 22:14:54 2011 +0100 @@ -1433,9 +1433,6 @@ "":yes:* | yes:yes:* ) thread_file=posix ;; - "":*:yes | yes:*:yes ) - thread_file=solaris - ;; esac ;; i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae) @@ -2610,9 +2607,6 @@ "":yes:* | yes:yes:* ) thread_file=posix ;; - "":*:yes | yes:*:yes ) - thread_file=solaris - ;; esac ;; sparc-wrs-vxworks) diff -r 5ba1687bfdfd gcc/config/sol2.h --- a/gcc/config/sol2.h Sun Mar 20 21:48:36 2011 +0100 +++ b/gcc/config/sol2.h Sun Mar 20 22:14:54 2011 +0100 @@ -83,7 +83,6 @@ #undef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC "\ %{pthreads|pthread:-D_REENTRANT -D_PTHREADS} \ -%{!pthreads:%{!pthread:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}}} \ %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} \ " @@ -137,8 +136,6 @@ %{!symbolic:\ %{pthreads|pthread:" \ LIB_THREAD_LDFLAGS_SPEC " -lpthread " LIB_TLS_SPEC "} \ - %{!pthreads:%{!pthread:%{threads:" \ - LIB_THREAD_LDFLAGS_SPEC " -lthread}}} \ %{p|pg:-ldl} -lc}" #undef ENDFILE_SPEC diff -r 5ba1687bfdfd gcc/config/sol2.opt --- a/gcc/config/sol2.opt Sun Mar 20 21:48:36 2011 +0100 +++ b/gcc/config/sol2.opt Sun Mar 20 22:14:54 2011 +0100 @@ -42,6 +42,3 @@ rdynamic Driver - -threads -Driver diff -r 5ba1687bfdfd gcc/configure.ac --- a/gcc/configure.ac Sun Mar 20 21:48:36 2011 +0100 +++ b/gcc/configure.ac Sun Mar 20 22:14:54 2011 +0100 @@ -1332,7 +1332,7 @@ target_thread_file='single' ;; aix | dce | gnat | irix | posix | posix95 | rtems | \ - single | solaris | vxworks | win32 | mipssde) + single | vxworks | win32 | mipssde) target_thread_file=${enable_threads} ;; *) diff -r 5ba1687bfdfd gcc/doc/install.texi --- a/gcc/doc/install.texi Sun Mar 20 21:48:36 2011 +0100 +++ b/gcc/doc/install.texi Sun Mar 20 22:14:54 2011 +0100 @@ -1129,9 +1129,6 @@ RTEMS thread support. @item single Disable thread support, should work for all platforms. -@item solaris -Sun Solaris 2/Unix International thread support. Only use this if you -really need to use this legacy API instead of the default, @samp{posix}. @item vxworks VxWorks thread support. @item win32 diff -r 5ba1687bfdfd gcc/doc/invoke.texi --- a/gcc/doc/invoke.texi Sun Mar 20 21:48:36 2011 +0100 +++ b/gcc/doc/invoke.texi Sun Mar 20 22:14:54 2011 +0100 @@ -854,7 +854,7 @@ @emph{Solaris 2 Options} @gccoptlist{-mimpure-text -mno-impure-text @gol --threads -pthreads -pthread} +-pthreads -pthread} @emph{SPARC Options} @gccoptlist{-mcpu=@var{cpu-type} @gol @@ -16931,13 +16931,6 @@ These switches are supported in addition to the above on Solaris 2: @table @gcctabopt -@item -threads -@opindex threads -Add support for multithreading using the Solaris threads library. This -option sets flags for both the preprocessor and linker. This option does -not affect the thread safety of object code produced by the compiler or -that of libraries supplied with it. - @item -pthreads @opindex pthreads Add support for multithreading using the POSIX threads library. This diff -r 5ba1687bfdfd gcc/gthr.h --- a/gcc/gthr.h Sun Mar 20 21:48:36 2011 +0100 +++ b/gcc/gthr.h Sun Mar 20 22:14:54 2011 +0100 @@ -1,6 +1,7 @@ /* Threads compatibility routines for libgcc2. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997, 1998, 2004, 2008, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2004, 2008, 2009, 2011 + Free Software Foundation, Inc. This file is part of GCC. @@ -136,7 +137,6 @@ POSIX/Unix98 threads with -D_PTHREADS POSIX/Unix95 threads with -D_PTHREADS95 DCE threads with -D_DCE_THREADS - Solaris/UI threads with -D_SOLARIS_THREADS */ @@ -149,8 +149,6 @@ #include "gthr-posix95.h" #elif _DCE_THREADS #include "gthr-dce.h" -#elif _SOLARIS_THREADS -#include "gthr-solaris.h" /* Include GTHREAD_FILE if one is defined. */ #elif defined(HAVE_GTHR_DEFAULT) diff -r 5ba1687bfdfd libjava/configure.ac --- a/libjava/configure.ac Sun Mar 20 21:48:36 2011 +0100 +++ b/libjava/configure.ac Sun Mar 20 22:14:54 2011 +0100 @@ -1033,7 +1033,7 @@ ;; win32) ;; - decosf1 | irix | mach | os2 | solaris | dce | vxworks) + decosf1 | irix | mach | os2 | dce | vxworks) AC_MSG_ERROR(thread package $THREADS not yet supported) ;; *) -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University