Received: (at submit) by debbugs.gnu.org; 14 Jan 2019 15:01:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 14 10:01:39 2019 Received: from localhost ([127.0.0.1]:59197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1gj3kA-0006LX-4W for submit <at> debbugs.gnu.org; Mon, 14 Jan 2019 10:01:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stacey.marshall@HIDDEN>) id 1gj3LM-0005W6-Vu for submit <at> debbugs.gnu.org; Mon, 14 Jan 2019 09:36:02 -0500 Received: from lists.gnu.org ([209.51.188.17]:37832) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <stacey.marshall@HIDDEN>) id 1gj3LH-0006iF-OB for submit <at> debbugs.gnu.org; Mon, 14 Jan 2019 09:35:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <stacey.marshall@HIDDEN>) id 1gj3LG-0001X9-Aw for bug-libtool@HIDDEN; Mon, 14 Jan 2019 09:35:55 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_50,HTML_MESSAGE, RCVD_IN_DNSWL_MED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <stacey.marshall@HIDDEN>) id 1gj3LF-0006ek-0H for bug-libtool@HIDDEN; Mon, 14 Jan 2019 09:35:54 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:52906) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <stacey.marshall@HIDDEN>) id 1gj3LE-0006WN-Mx for bug-libtool@HIDDEN; Mon, 14 Jan 2019 09:35:52 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x0EEYHQm115982 for <bug-libtool@HIDDEN>; Mon, 14 Jan 2019 14:35:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : mime-version : content-type; s=corp-2018-07-02; bh=jHiFUH9Hih6IhAYUJ59epRYBzn/4oM0TG3815rY2yiU=; b=dyR3m0pI5xLZkEKSZaJ5pq+oL8NadhcWSDtMA5v+kUBlKV5afQKnuAG+MAIsplVQ+qkx D3+FGyPEnf1IZVs8hYy44+i8uHYnpYqa6nvbKkuMF3NoQa3UvNGx7AdBY3PdrAly79qf uzYV1NZOhv0Yto8bce+vpY5LYtVvOadBX/yKJP1JD79yPSgPpNXO8ygE3J97p9UYgVvH uVuigIx5KrCeouI1EW9/0rB1IoBbIgSAHW5uQcXOh2bIti4a2anPxq3S+EzeazjyPN3j wCwn4j+7AXUU+6IFsccFlAY50h8mUWCWUoD2lyMpwPoiiTkxKQ2oJM5OnzG61BQurMA8 Gg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2pybjrwssh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <bug-libtool@HIDDEN>; Mon, 14 Jan 2019 14:35:48 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x0EEZlkw010040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <bug-libtool@HIDDEN>; Mon, 14 Jan 2019 14:35:48 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x0EEZlt1028347 for <bug-libtool@HIDDEN>; Mon, 14 Jan 2019 14:35:47 GMT Received: from [10.175.168.173] (/10.175.168.173) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 14 Jan 2019 06:35:46 -0800 From: "Stacey Marshall" <stacey.marshall@HIDDEN> To: bug-libtool@HIDDEN Subject: Patch to libtool for solaris 11.4 link-editor which rejects -pthread option Date: Mon, 14 Jan 2019 14:35:44 +0000 X-Mailer: MailMate (1.12.3r5579) Message-ID: <9BCD209C-EB5D-4E1D-B8F9-0A20D8991D79@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_436AD6D0-D11D-4D3E-ADEE-414BE32F2109_=" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9135 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901140121 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.85 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 14 Jan 2019 10:01:36 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) --=_MailMate_436AD6D0-D11D-4D3E-ADEE-414BE32F2109_= Content-Type: text/plain; format=flowed; markup=markdown Solaris 11.4 link-editor, ld(1), has been updated to reject options '-thread' and '-pthread'. Details from Oracle Bug 22985199 > The GNU configuration process has been known to pass the > options -thread and -pthread to ld(1), or to the compiler > driver which will try and pass them to ld(1). > > ld(1) uses getopt(3c) processing. The compilers take the > options they know about and pass the others to ld(1). > > These options, which are specific to gcc, can result in > silent errors: > > % ld -o null.so -G -thread null.o > % elfdump -d null.so | fgrep SONAME > [0] SONAME 0x5c read > > The -t option is peeled off, being a valid ld(1) option, > and the rest, '-h read' gets interpreted as an SONAME, which > is probably not what the user expected. If you tried to > create an executable, you'd get an error, but it's not > immediately obvious where the -h came from: > > % ld -o main -thread null.o > ld: fatal: option '-h read' is incompatible with building \\ > a dynamic executable > > With -pthread we get the same result when building a shared > object or an executable: > > % ld -o null.so -G -pthread null.o > % elfdump -d null.so | fgrep AUDIT > [0] AUDIT 0x5c thread > > The -p is peeled off, and its optarg used to define an auditor. > Again, probably not what the user wanted. > > The Studio compilers can behave slightly differently in that > they can affect the options passed to ld(1): For example > > % cc -o null.so -G -thread null.o > > results in ld(1) seeing distinct options '-t -hread'. > > Given these are "bad" options to ld(1), it would be helpful > to our Userland developers if ld(1) could recognize them > rather than falling through to getopt() processing, where the > options are mis-interpreted and "might" result in an error > depending on the output file being produced. Following patch prevents '-pthread' from being passed to ld on solaris2 hosts. libtool should not pass option '-pthread' to Solaris link-editor. diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh index 0f0a2da3f9..7c8bcfd9d2 100644 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -7070,7 +7070,21 @@ func_mode_link () continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. + -pthread) + case $host in + *solaris2*) ;; + *) + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + ;; + esac + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" Mr. Stacey Marshall - Principal Software Engineer - Oracle UK Oracle Systems, SPARC & Solaris System Software Engineering. stacey.marshall@HIDDEN --=_MailMate_436AD6D0-D11D-4D3E-ADEE-414BE32F2109_= Content-Type: text/html Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/xhtml; charset=3Dutf-8"= > <style> div.markdown { white-space: normal; } body { font-family: sans-serif; } h1 { font-size: 1.4em; } h2 { font-size: 1.2em; } h3 { font-size: 1.1em; } blockquote { margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #= 3983C4; color: #3983C4; } blockquote blockquote { border-left-color: #7CBF0C; color: #7CBF0C; } @media (prefers-color-scheme: dark) { a { color: #136BCE; } } pre { margin-left: 15px; margin-right: 15px; padding: 5px; border: thin s= olid gray; overflow-x: auto; max-width: 90vw; } div.footnotes li p { margin: 0.2em 0; } </style> </head> <body> <div class=3D"markdown"> <p dir=3D"auto">Solaris 11.4 link-editor, ld(1), has been updated to reje= ct options '-thread' and '-pthread'.</p> <p dir=3D"auto">Details from Oracle Bug 22985199</p> <blockquote> <p dir=3D"auto">The GNU configuration process has been known to pass the<= br> options -thread and -pthread to ld(1), or to the compiler<br> driver which will try and pass them to ld(1).</p> <p dir=3D"auto">ld(1) uses getopt(3c) processing. The compilers take the= <br> options they know about and pass the others to ld(1).</p> <p dir=3D"auto">These options, which are specific to gcc, can result in<b= r> silent errors:</p> <p dir=3D"auto">% ld -o null.so -G -thread null.o<br> % elfdump -d null.so | fgrep SONAME<br> [0] SONAME 0x5c read</p> <p dir=3D"auto">The -t option is peeled off, being a valid ld(1) option,<= br> and the rest, '-h read' gets interpreted as an SONAME, which<br> is probably not what the user expected. If you tried to<br> create an executable, you'd get an error, but it's not<br> immediately obvious where the -h came from:</p> <p dir=3D"auto">% ld -o main -thread null.o<br> ld: fatal: option '-h read' is incompatible with building \<br> a dynamic executable</p> <p dir=3D"auto">With -pthread we get the same result when building a shar= ed<br> object or an executable:</p> <p dir=3D"auto">% ld -o null.so -G -pthread null.o<br> % elfdump -d null.so | fgrep AUDIT<br> [0] AUDIT 0x5c thread</p> <p dir=3D"auto">The -p is peeled off, and its optarg used to define an au= ditor.<br> Again, probably not what the user wanted.</p> <p dir=3D"auto">The Studio compilers can behave slightly differently in t= hat<br> they can affect the options passed to ld(1): For example</p> <p dir=3D"auto">% cc -o null.so -G -thread null.o</p> <p dir=3D"auto">results in ld(1) seeing distinct options '-t -hread'.</p>= <p dir=3D"auto">Given these are "bad" options to ld(1), it would be helpf= ul<br> to our Userland developers if ld(1) could recognize them<br> rather than falling through to getopt() processing, where the<br> options are mis-interpreted and "might" result in an error<br> depending on the output file being produced.</p> </blockquote> <p dir=3D"auto">Following patch prevents '-pthread' from being passed to = ld on solaris2 hosts.</p> <pre><code>libtool should not pass option '-pthread' to Solaris link-edit= or. diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh index 0f0a2da3f9..7c8bcfd9d2 100644 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -7070,7 +7070,21 @@ func_mode_link () continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \= + # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. + -pthread) + case $host in + *solaris2*) ;; + *) + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg"= ;; + esac + ;; + esac + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=3D*) func_append compiler_flags " $arg" func_append compile_command " $arg" </code></pre> <p dir=3D"auto">Mr. Stacey Marshall - Principal Software Engineer - Oracl= e UK<br> Oracle Systems, SPARC & Solaris System Software Engineering.<br> <a href=3D"mailto:stacey.marshall@HIDDEN">stacey.marshall@HIDDEN<= /a></p> </div> </body> </html> --=_MailMate_436AD6D0-D11D-4D3E-ADEE-414BE32F2109_=--
"Stacey Marshall" <stacey.marshall@HIDDEN>
:bug-libtool@HIDDEN
.
Full text available.bug-libtool@HIDDEN
:bug#34076
; Package libtool
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.