https://gcc.gnu.org/g:82e0355a40cb03cde89becb8b6c2aed7f02514a7
commit r16-6867-g82e0355a40cb03cde89becb8b6c2aed7f02514a7 Author: Sandra Loosemore <[email protected]> Date: Sun Jan 4 23:03:46 2026 +0000 doc, Solaris: Clean up documentation of Solaris 2 options [PR122243] gcc/ChangeLog PR other/122243 * doc/invoke.texi (Option Summary) <Solaris 2 Options>: Remove redundant negative option forms from list. List both -pthread and -pthreads. (Solaris 2 Options): Index and list the negative forms here. Combine the two @table environments. Document both -pthread and -pthreads. Diff: --- gcc/doc/invoke.texi | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 613b36b0f434..0bdabf34517e 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1449,7 +1449,7 @@ See RS/6000 and PowerPC Options. @emph{Solaris 2 Options} (@ref{Solaris 2 Options}) @gccoptlist{-mclear-hwcap -mno-clear-hwcap -mimpure-text -mno-impure-text --gsctf -pthreads} +-gsctf -pthread -pthreads} @emph{SPARC Options} (@ref{SPARC Options}) @gccoptlist{-mcpu=@var{cpu-type} @@ -34795,18 +34795,22 @@ allocator is used. @subsection Solaris 2 Options @cindex Solaris 2 options -These @samp{-m} options are supported on Solaris 2: +These options are supported on Solaris 2: @table @gcctabopt @opindex mclear-hwcap +@opindex mno-clear-hwcap @item -mclear-hwcap +@itemx -mno-clear-hwcap @option{-mclear-hwcap} tells the compiler to remove the hardware capabilities generated by the Solaris assembler. This is only necessary when object files use ISA extensions not supported by the current machine, but check at runtime whether or not to use them. @opindex mimpure-text +@opindex mno-impure-text @item -mimpure-text +@itemx -mno-impure-text @option{-mimpure-text}, used in addition to @option{-shared}, tells the compiler to not pass @option{-z text} to the linker when linking a shared object. Using this option, you can link position-dependent @@ -34819,20 +34823,23 @@ shared object is not actually shared across processes. Instead of using @option{-mimpure-text}, you should compile all source code with @option{-fpic} or @option{-fPIC}. -@end table - -These switches are supported in addition to the above on Solaris 2: - -@table @gcctabopt @opindex gsctf @item -gsctf Generate Solaris CTF. Needs to be used both for compilation and linking. See @command{ctf(7)} for more information. This is only supported since Solaris 11.4 SRU 84 where the necessary toolchain support was added. + +@opindex pthread @opindex pthreads -@item -pthreads -This is a synonym for @option{-pthread}. +@item -pthread +@itemx -pthreads +On Solaris targets, these both options define the preprocessor symbols +@code{_REENTRANT} and @code{_PTHREADS}. In modern versions of Solaris +these symbols are no longer used in system headers and these options are +unnecessary unless user code references them. Additionally, since +POSIX thread support is provided directly by the Solaris C library, it is +not necessary to use @option{-pthread} for linking. @end table @node SPARC Options
