From patchwork Mon Jan 9 02:43:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 90327 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp656071qgi; Sun, 8 Jan 2017 18:44:19 -0800 (PST) X-Received: by 10.99.6.140 with SMTP id 134mr150892542pgg.53.1483929859256; Sun, 08 Jan 2017 18:44:19 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id t5si10583345pgb.147.2017.01.08.18.44.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Jan 2017 18:44:19 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-445638-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-445638-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-445638-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=IxlfIpnco2rxr2rsWvCcqJ/4E93FBT5fp1Oh5cH6HblVtwfcZ8 IIMN3KgGnPaV6nek1O0bSTdKAv5n60pz+WdWhBeJSRyaGdsn6YpS0P4f8n74nOnb GDRc9YMrffzCIJPRa9DvyQBt54nlGmvSvibDGf6QiEY0imrW2VE3Jwhus= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=HnsD1BF2iOGYHFkseg6ztC0S88A=; b=tCOzhpo4CM0qCY5l/zYZ y3dYwYlChSbxf0DPFEATQnmGTVOHG+5bjSV0LUssUNLrDhW2PrUWfs8XnLXT8EBH x0AeD7duCPYEqNVjT+8H1Xh7xigCDjA46uXBGJtNx8C8yBODCZfJTuAs98KGyhTl vDbo0nrPfzqj2HNrN1c3vEE= Received: (qmail 525 invoked by alias); 9 Jan 2017 02:43:55 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 481 invoked by uid 89); 9 Jan 2017 02:43:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.8 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPAM_SUBJECT1, SPF_PASS, URIBL_RED autolearn=no version=3.3.2 spammy=nostartfiles, D*var, ObjectiveC, @gol X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Jan 2017 02:43:46 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cQPvz-0003DQ-IW from Sandra_Loosemore@mentor.com for gcc-patches@gcc.gnu.org; Sun, 08 Jan 2017 18:43:43 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sun, 8 Jan 2017 18:43:40 -0800 To: "gcc-patches@gcc.gnu.org" From: Sandra Loosemore Subject: [doc, committed] (finally) fix -pthread documentation Message-ID: <5872F8DB.1070807@codesourcery.com> Date: Sun, 8 Jan 2017 19:43:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Returning to a patch I first posted about a month ago: the conclusion seemed to be that -pthread needed to be documented with both the linker and preprocessor options. Now that I've gotten the existing cpp options documentation at least somewhat cleaned up of other cruft :-) I've checked in this patch to fix the -pthread docs. -Sandra Index: gcc/doc/cppopts.texi =================================================================== --- gcc/doc/cppopts.texi (revision 244213) +++ gcc/doc/cppopts.texi (working copy) @@ -69,6 +69,13 @@ standard predefined macros remain define @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} Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 244213) +++ gcc/doc/invoke.texi (working copy) @@ -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 th @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 ar 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 @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