From f5e2061b4576b23ffa446c5b11344edb4dc56ac7 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 7 Feb 2006 21:50:37 +0100 Subject: [PATCH] sol26.h (CPP_SUBTARGET_SPEC): Accept -pthread. * config/sol26.h (CPP_SUBTARGET_SPEC): Accept -pthread. * config/sol2.h (CPP_SUBTARGET_SPEC): Likewise. (LIB_SPEC): Likewise. * doc/invoke.texi (SPARC options): Document -pthread. From-SVN: r110717 --- gcc/ChangeLog | 7 +++++++ gcc/config/sol2.h | 8 ++++---- gcc/config/sol26.h | 4 ++-- gcc/doc/invoke.texi | 6 +++++- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 71da549d4bd..da642fadff1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2006-02-07 Eric Botcazou + + * config/sol26.h (CPP_SUBTARGET_SPEC): Accept -pthread. + * config/sol2.h (CPP_SUBTARGET_SPEC): Likewise. + (LIB_SPEC): Likewise. + * doc/invoke.texi (SPARC options): Document -pthread. + 2006-02-07 Geoffrey Keating * config/i386/i386.c (ix86_delegitimize_address): Support Darwin diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h index 51f9bd82e97..5ffaf575830 100644 --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -47,8 +47,8 @@ Boston, MA 02110-1301, USA. */ #undef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC "\ -%{pthreads:-D_REENTRANT -D_PTHREADS} \ -%{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \ +%{pthreads|pthread:-D_REENTRANT -D_PTHREADS} \ +%{!pthreads:%{!pthread:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}}} \ %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} \ " @@ -93,8 +93,8 @@ Boston, MA 02110-1301, USA. */ "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \ %{!shared:\ %{!symbolic:\ - %{pthreads:-lpthread} \ - %{!pthreads:%{threads:-lthread}} \ + %{pthreads|pthread:-lpthread} \ + %{!pthreads:%{!pthread:%{threads:-lthread}}} \ %{p|pg:-ldl} -lc}}" #undef ENDFILE_SPEC diff --git a/gcc/config/sol26.h b/gcc/config/sol26.h index 5d920339712..d5b7dda2a5f 100644 --- a/gcc/config/sol26.h +++ b/gcc/config/sol26.h @@ -21,7 +21,7 @@ Boston, MA 02110-1301, USA. */ #undef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC "\ -%{pthreads:-D_REENTRANT -D_PTHREADS95} \ -%{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \ +%{pthreads|pthread:-D_REENTRANT -D_PTHREADS95} \ +%{!pthreads:%{!pthread:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}}} \ %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} \ " diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index f9b65f8fd25..d68e94d31e6 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -708,7 +708,7 @@ See RS/6000 and PowerPC Options. -mstack-bias -mno-stack-bias @gol -munaligned-doubles -mno-unaligned-doubles @gol -mv8plus -mno-v8plus -mvis -mno-vis --threads -pthreads} +-threads -pthreads -pthread} @emph{System V Options} @gccoptlist{-Qy -Qn -YP,@var{paths} -Ym,@var{dir}} @@ -12397,6 +12397,10 @@ Add support for multithreading using the POSIX 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 -pthread +@opindex pthread +This is a synonym for @option{-pthreads}. @end table @node System V Options