aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2017-01-08 21:39:24 -0500
committerSandra Loosemore <sandra@gcc.gnu.org>2017-01-08 21:39:24 -0500
commitc71b316b7a012c3b14c9d9736838ffc286a73a51 (patch)
tree42735a5f23604336c74336c0c845d75bb56fc1f2 /gcc
parent89b49585f0115a371ae3439d782cc3ce5e40c6af (diff)
downloadgcc-c71b316b7a012c3b14c9d9736838ffc286a73a51.zip
gcc-c71b316b7a012c3b14c9d9736838ffc286a73a51.tar.gz
gcc-c71b316b7a012c3b14c9d9736838ffc286a73a51.tar.bz2
re PR other/16519 (-pthread undocumented)
2017-01-08 Sandra Loosemore <sandra@codesourcery.com> PR other/16519 gcc/ * doc/invoke.texi (Option Summary): Move -pthread to Linker Options and Preprocessor Options. (Options for Linking): Document -pthread here.... (RS/6000 and PowerPC Options): ...not here. (Solaris 2 Options): ...or here. * doc/cppopts.texi: Document -pthread. From-SVN: r244214
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/doc/cppopts.texi7
-rw-r--r--gcc/doc/invoke.texi30
3 files changed, 31 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9c2661b..aa231c1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2017-01-08 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR other/16519
+
+ * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
+ and Preprocessor Options.
+ (Options for Linking): Document -pthread here....
+ (RS/6000 and PowerPC Options): ...not here.
+ (Solaris 2 Options): ...or here.
+ * doc/cppopts.texi: Document -pthread.
+
2017-01-08 Martin Sebor <msebor@redhat.com>
PR middle-end/77708
diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi
index 80f3ba3..0497712 100644
--- a/gcc/doc/cppopts.texi
+++ b/gcc/doc/cppopts.texi
@@ -69,6 +69,13 @@ standard predefined macros remain defined.
@xref{Standard Predefined Macros}.
@end ifset
+@item -pthread
+@opindex pthread
+Define additional macros required for using the POSIX threads library.
+You should use this option consistently for both compilation and linking.
+This option is supported on GNU/Linux targets, most other Unix derivatives,
+and also on x86 Cygwin and MinGW targets.
+
@item -M
@opindex M
@cindex @command{make}
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6cf03ef..db17698 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -475,7 +475,7 @@ Objective-C and Objective-C++ Dialects}.
-fwide-exec-charset=@var{charset} -fworking-directory @gol
-H -imacros @var{file} -include @var{file} @gol
-M -MD -MF -MG -MM -MMD -MP -MQ -MT @gol
--no-integrated-cpp -P -remap @gol
+-no-integrated-cpp -P -pthread -remap @gol
-traditional -traditional-cpp -trigraphs @gol
-U@var{macro} -undef @gol
-Wp,@var{option} -Xpreprocessor @var{option}}
@@ -487,7 +487,7 @@ Objective-C and Objective-C++ Dialects}.
@item Linker Options
@xref{Link Options,,Options for Linking}.
@gccoptlist{@var{object-file-name} -fuse-ld=@var{linker} -l@var{library} @gol
--nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol
+-nostartfiles -nodefaultlibs -nostdlib -pie -pthread -rdynamic @gol
-s -static -static-libgcc -static-libstdc++ @gol
-static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
-static-libmpx -static-libmpxwrappers @gol
@@ -1023,7 +1023,7 @@ See RS/6000 and PowerPC Options.
-mfloat-gprs=yes -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double @gol
-mprototype -mno-prototype @gol
-msim -mmvme -mads -myellowknife -memb -msdata @gol
--msdata=@var{opt} -mvxworks -G @var{num} -pthread @gol
+-msdata=@var{opt} -mvxworks -G @var{num} @gol
-mrecip -mrecip=@var{opt} -mno-recip -mrecip-precision @gol
-mno-recip-precision @gol
-mveclibabi=@var{type} -mfriz -mno-friz @gol
@@ -1096,7 +1096,7 @@ See RS/6000 and PowerPC Options.
@emph{Solaris 2 Options}
@gccoptlist{-mclear-hwcap -mno-clear-hwcap -mimpure-text -mno-impure-text @gol
--pthreads -pthread}
+-pthreads}
@emph{SPARC Options}
@gccoptlist{-mcpu=@var{cpu-type} @gol
@@ -11566,6 +11566,14 @@ or model suboptions) when you specify this linker option.
@opindex no-pie
Don't produce a position independent executable.
+@item -pthread
+@opindex pthread
+Link with the POSIX threads library. This option is supported on
+GNU/Linux targets, most other Unix derivatives, and also on
+x86 Cygwin and MinGW targets. On some targets this option also sets
+flags for the preprocessor, so it should be used consistently for both
+compilation and linking.
+
@item -rdynamic
@opindex rdynamic
Pass the flag @option{-export-dynamic} to the ELF linker, on targets
@@ -22040,11 +22048,6 @@ reliably associate function call with argument setup instructions for
TLS optimization, which in turn allows GCC to better schedule the
sequence.
-@item -pthread
-@opindex pthread
-Adds support for multithreading with the @dfn{pthreads} library.
-This option sets flags for both the preprocessor and linker.
-
@item -mrecip
@itemx -mno-recip
@opindex mrecip
@@ -23186,14 +23189,7 @@ These switches are supported in addition to the above on Solaris 2:
@table @gcctabopt
@item -pthreads
@opindex pthreads
-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}.
+This is a synonym for @option{-pthread}.
@end table
@node SPARC Options