Commit 18167442 by Eric Botcazou Committed by Eric Botcazou

re PR target/18444 (Multithreading broken on Unix95-class platforms)

	PR target/18444
	* configure.ac (threading): Accept 'posix95'.
	* configure: Regenerate.
	* config.gcc (i[34567]86-*-solaris2*): On Solaris up to 2.6,
	include sol26.h and default to posix95 threads if have_pthread_h.
	(sparc-*-solaris2*): Likewise.
	* gthr.h: Include gthr-posix95.h if _PTHREADS95 is defined.
	* gthr-posix95.h: New file.
	* config/sol26.h: New file.
	* doc/install.texi (--enable-threads): Document 'posix95'.

From-SVN: r91041
parent 515a1791
2004-11-22 Eric Botcazou <ebotcazou@libertysurf.fr>
PR target/18444
* configure.ac (threading): Accept 'posix95'.
* configure: Regenerate.
* config.gcc (i[34567]86-*-solaris2*): On Solaris up to 2.6,
include sol26.h and default to posix95 threads if have_pthread_h.
(sparc-*-solaris2*): Likewise.
* gthr.h: Include gthr-posix95.h if _PTHREADS95 is defined.
* gthr-posix95.h: New file.
* config/sol26.h: New file.
* doc/install.texi (--enable-threads): Document 'posix95'.
2004-11-23 Ben Elliston <bje@au.ibm.com> 2004-11-23 Ben Elliston <bje@au.ibm.com>
* pointer-set.h (pointer_set_contains): Remove. * pointer-set.h (pointer_set_contains): Remove.
......
...@@ -1012,7 +1012,12 @@ i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5 ...@@ -1012,7 +1012,12 @@ i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
;; ;;
i[34567]86-*-solaris2*) i[34567]86-*-solaris2*)
xm_defines="SMALL_ARG_MAX" xm_defines="SMALL_ARG_MAX"
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h i386/sol2.h" tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h"
case ${target} in
*-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
tm_file="${tm_file} sol26.h"
esac
tm_file="${tm_file} i386/sol2.h"
tmake_file="t-sol2 i386/t-sol2 t-svr4" tmake_file="t-sol2 i386/t-sol2 t-svr4"
c_target_objs="sol2-c.o" c_target_objs="sol2-c.o"
cxx_target_objs="sol2-c.o" cxx_target_objs="sol2-c.o"
...@@ -1044,8 +1049,19 @@ i[34567]86-*-solaris2*) ...@@ -1044,8 +1049,19 @@ i[34567]86-*-solaris2*)
;; ;;
esac esac
case ${enable_threads}:${have_pthread_h}:${have_thread_h} in case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
"":yes:* | yes:yes:* ) thread_file=posix ;; "":yes:* | yes:yes:* )
"":*:yes | yes:*:yes ) thread_file=solaris ;; case ${target} in
*-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
thread_file=posix95
;;
*)
thread_file=posix
;;
esac
;;
"":*:yes | yes:*:yes )
thread_file=solaris
;;
esac esac
;; ;;
i[34567]86-*-sysv5*) # Intel x86 on System V Release 5 i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
...@@ -1902,7 +1918,12 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*) ...@@ -1902,7 +1918,12 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*)
need_64bit_hwint=yes need_64bit_hwint=yes
;; ;;
sparc-*-solaris2*) sparc-*-solaris2*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h" tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
case ${target} in
*-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
tm_file="${tm_file} sol26.h"
esac
tm_file="${tm_file} sparc/sol2.h"
if test x$gnu_ld = xyes; then if test x$gnu_ld = xyes; then
tm_file="${tm_file} sparc/sol2-gld.h" tm_file="${tm_file} sparc/sol2-gld.h"
fi fi
...@@ -1939,8 +1960,19 @@ sparc-*-solaris2*) ...@@ -1939,8 +1960,19 @@ sparc-*-solaris2*)
tm_p_file="${tm_p_file} sol2-protos.h" tm_p_file="${tm_p_file} sol2-protos.h"
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o" extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
case ${enable_threads}:${have_pthread_h}:${have_thread_h} in case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
"":yes:* | yes:yes:* ) thread_file=posix ;; "":yes:* | yes:yes:* )
"":*:yes | yes:*:yes ) thread_file=solaris ;; case ${target} in
*-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
thread_file=posix95
;;
*)
thread_file=posix
;;
esac
;;
"":*:yes | yes:*:yes )
thread_file=solaris
;;
esac esac
;; ;;
sparc-*-sysv4*) sparc-*-sysv4*)
......
/* Operating system specific defines to be used when targeting GCC for any
Solaris 2 system up to Solaris 2.6.
Copyright 2004 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC "\
%{pthreads:-D_REENTRANT -D_PTHREADS95} \
%{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \
%{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} \
"
...@@ -11976,7 +11976,7 @@ case ${enable_threads} in ...@@ -11976,7 +11976,7 @@ case ${enable_threads} in
# default # default
target_thread_file='single' target_thread_file='single'
;; ;;
aix | dce | gnat | irix | posix | rtems | \ aix | dce | gnat | irix | posix | posix95 | rtems | \
single | solaris | vxworks | win32 ) single | solaris | vxworks | win32 )
target_thread_file=${enable_threads} target_thread_file=${enable_threads}
;; ;;
......
...@@ -1266,7 +1266,7 @@ case ${enable_threads} in ...@@ -1266,7 +1266,7 @@ case ${enable_threads} in
# default # default
target_thread_file='single' target_thread_file='single'
;; ;;
aix | dce | gnat | irix | posix | rtems | \ aix | dce | gnat | irix | posix | posix95 | rtems | \
single | solaris | vxworks | win32 ) single | solaris | vxworks | win32 )
target_thread_file=${enable_threads} target_thread_file=${enable_threads}
;; ;;
......
...@@ -926,7 +926,9 @@ missing and thus this setting will cause a known bootstrap failure.) ...@@ -926,7 +926,9 @@ missing and thus this setting will cause a known bootstrap failure.)
@item no @item no
This is an alias for @samp{single}. This is an alias for @samp{single}.
@item posix @item posix
Generic POSIX thread support. Generic POSIX/Unix98 thread support.
@item posix95
Generic POSIX/Unix95 thread support.
@item rtems @item rtems
RTEMS thread support. RTEMS thread support.
@item single @item single
......
...@@ -83,7 +83,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -83,7 +83,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
number. If the operation is not supported, -1 is returned. number. If the operation is not supported, -1 is returned.
Currently supported threads packages are Currently supported threads packages are
POSIX threads with -D_PTHREADS TPF threads with -D__tpf__
POSIX/Unix98 threads with -D_PTHREADS
POSIX/Unix95 threads with -D_PTHREADS95
DCE threads with -D_DCE_THREADS DCE threads with -D_DCE_THREADS
Solaris/UI threads with -D_SOLARIS_THREADS Solaris/UI threads with -D_SOLARIS_THREADS
*/ */
...@@ -93,6 +95,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -93,6 +95,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "gthr-tpf.h" #include "gthr-tpf.h"
#elif _PTHREADS #elif _PTHREADS
#include "gthr-posix.h" #include "gthr-posix.h"
#elif _PTHREADS95
#include "gthr-posix95.h"
#elif _DCE_THREADS #elif _DCE_THREADS
#include "gthr-dce.h" #include "gthr-dce.h"
#elif _SOLARIS_THREADS #elif _SOLARIS_THREADS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment