PR v3/38923: symbol versioning disabled on Solaris due to sed.

View: New views
13 Messages — Rating Filter:   Alert me  

PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Ralf Wildenhues :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Apparently Solaris sed regexes understand neither * nor \{N,M\} after
subexpressions \(...\).  (For * this was documented already in
autoconf.texi, the rest is:
<http://thread.gmane.org/gmane.comp.sysutils.autoconf.patches/6880>).
This causes the failure in the PR.

Sigh.  At least my fixincludes sed fixup doesn't need to be revised;
there, * and \{N,M\} follow only one-character atoms or bracket
expressions.  ltmain.sh will need a minor fix, but the rest of autotools
and GCC (apart from this PR) are ok.

The new regex is a bit less strict but shouldn't cause problems in
practice.  At least it's still fairly readable.

The 'q' at the end is equivalent to 'head -1'.

Survived a bootstrap on i686-pc-linux-gnu.  I can't really test a full
GCC bootstrap on Solaris, so any chance you, Jonathan, or somebody else
can confirm this to fix the problem?

Thanks,
Ralf

sed and head portability fixes in ld version check.

libstdc++-v3/ChangeLog:
2009-09-23  Ralf Wildenhues  <Ralf.Wildenhues@...>

        PR libstdc++/38923
        * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid 'head',
        use sed script portable to Solaris /bin/sed for extracting ld
        version.
        * configure: Regenerate.

libgomp/ChangeLog:
2009-09-23  Ralf Wildenhues  <Ralf.Wildenhues@...>

        * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid 'head',
        use sed script portable to Solaris /bin/sed for extracting ld
        version.
        * configure: Regenerate.

diff --git a/libgomp/acinclude.m4 b/libgomp/acinclude.m4
index ac450ca..5e0f96c 100644
--- a/libgomp/acinclude.m4
+++ b/libgomp/acinclude.m4
@@ -152,8 +152,8 @@ AC_DEFUN([LIBGOMP_CHECK_LINKER_FEATURES], [
     libgomp_ld_is_gold=yes
   fi
   changequote(,)
-  ldver=`$LD --version 2>/dev/null | head -1 | \
-         sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'`
+  ldver=`$LD --version 2>/dev/null |
+         sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
   changequote([,])
   libgomp_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 45e0229..04487e6 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -209,8 +209,8 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
     if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then
       glibcxx_ld_is_gold=yes
     fi
-    ldver=`$LD --version 2>/dev/null | head -1 | \
-           sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'`
+    ldver=`$LD --version 2>/dev/null |
+   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
     changequote([,])
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`

Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Jonathan Wakely-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/23 Ralf Wildenhues:
>
> Survived a bootstrap on i686-pc-linux-gnu.  I can't really test a full
> GCC bootstrap on Solaris, so any chance you, Jonathan, or somebody else
> can confirm this to fix the problem?

I no longer have access to the Solaris systems I was building on, so
I'm afraid I can't test this, sorry.

Jonathan

Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Benjamin Kosnik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Would love to have this problem licked. Ranier, any chance you could
take a look at this?

-benjamin

Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Rainer Orth-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Benjamin Kosnik <bkoz@...> writes:

> Would love to have this problem licked. Ranier, any chance you could
> take a look at this?

I haven't run a full bootstrap with the patch yet, but checked both the
old and new ways to set LDVERS with Solaris /usr/bin/sed,
/usr/xpg4/bin/sed and GNU sed 4.1.5 (/usr/gnu/bin/sed in Solaris
Express): the old way fails with /usr/bin/sed, while Ralf's proposed fix
correctly determines the version number of Solaris Express
/usr/sfw/bin/gld (2.19), so the changes seem fine to me.

        Rainer

--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Benjamin Kosnik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> libstdc++-v3/ChangeLog:
> 2009-09-23  Ralf Wildenhues  <Ralf.Wildenhues@...>
>
> PR libstdc++/38923
> * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid 'head',
> use sed script portable to Solaris /bin/sed for extracting ld
> version.
> * configure: Regenerate.

This is OK via http://gcc.gnu.org/ml/libstdc++/2009-09/msg00120.html

-benjamin


Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Jason Merrill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 09/22/2009 09:21 PM, Ralf Wildenhues wrote:
> 2009-09-23  Ralf Wildenhues<Ralf.Wildenhues@...>
>
> PR libstdc++/38923
> * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid 'head',
> use sed script portable to Solaris /bin/sed for extracting ld
> version.
> * configure: Regenerate.

This patch broke symbol versioning on Fedora 11, and I'm surprised that
the pattern would work on any target.

> +         sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`

The "\(([^)]* *\) " bit requires at minimum "( " which is not present in
GNU ld --version on my system.

Jason

Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Ralf Wildenhues :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Jason Merrill wrote on Fri, Oct 23, 2009 at 07:07:47AM CEST:
> On 09/22/2009 09:21 PM, Ralf Wildenhues wrote:
> > PR libstdc++/38923
> > * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid 'head',
> > use sed script portable to Solaris /bin/sed for extracting ld
> > version.
> > * configure: Regenerate.
>
> This patch broke symbol versioning on Fedora 11, and I'm surprised
> that the pattern would work on any target.

I managed to try only on targets which have a part in parenthesis added.
:-/

> >+         sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
>
> The "\(([^)]* *\) " bit requires at minimum "( " which is not
> present in GNU ld --version on my system.

My first idea would be to stick in another *, as below, but now I'm not
so sure this wouldn't allow too much, thus would be able to match
wrongly.  Maybe it is better to make a bit longer but more reliable
script.

I'll look into it this weekend.

Thanks,
Ralf


diff --git a/libgomp/acinclude.m4 b/libgomp/acinclude.m4
index 5e0f96c..090c9f6 100644
--- a/libgomp/acinclude.m4
+++ b/libgomp/acinclude.m4
@@ -153,7 +153,7 @@ AC_DEFUN([LIBGOMP_CHECK_LINKER_FEATURES], [
   fi
   changequote(,)
   ldver=`$LD --version 2>/dev/null |
-         sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+         sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\((*[^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
   changequote([,])
   libgomp_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 51e35ea..9e3dcc5 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -210,7 +210,7 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\((*[^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
     changequote([,])
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`



Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Andreas Schwab-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ralf Wildenhues <Ralf.Wildenhues@...> writes:

> My first idea would be to stick in another *, as below, but now I'm not
> so sure this wouldn't allow too much, thus would be able to match
> wrongly.  Maybe it is better to make a bit longer but more reliable
> script.

How about switching to awk?

Andreas.

--
Andreas Schwab, schwab@...
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Jakub Jelinek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 23, 2009 at 08:25:14AM +0200, Ralf Wildenhues wrote:

> * Jason Merrill wrote on Fri, Oct 23, 2009 at 07:07:47AM CEST:
> > On 09/22/2009 09:21 PM, Ralf Wildenhues wrote:
> > > PR libstdc++/38923
> > > * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid 'head',
> > > use sed script portable to Solaris /bin/sed for extracting ld
> > > version.
> > > * configure: Regenerate.
> >
> > This patch broke symbol versioning on Fedora 11, and I'm surprised
> > that the pattern would work on any target.
>
> I managed to try only on targets which have a part in parenthesis added.
> :-/
>
> > >+         sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
> >
> > The "\(([^)]* *\) " bit requires at minimum "( " which is not
> > present in GNU ld --version on my system.
>
> My first idea would be to stick in another *, as below, but now I'm not
> so sure this wouldn't allow too much, thus would be able to match
> wrongly.  Maybe it is better to make a bit longer but more reliable
> script.

Definitely.  With all the *'s it can match all kinds of unexpected stuff.

        Jakub

Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Jakub Jelinek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 26, 2009 at 01:49:08PM +0100, Jakub Jelinek wrote:

> On Fri, Oct 23, 2009 at 08:25:14AM +0200, Ralf Wildenhues wrote:
> > * Jason Merrill wrote on Fri, Oct 23, 2009 at 07:07:47AM CEST:
> > > On 09/22/2009 09:21 PM, Ralf Wildenhues wrote:
> > > > PR libstdc++/38923
> > > > * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid 'head',
> > > > use sed script portable to Solaris /bin/sed for extracting ld
> > > > version.
> > > > * configure: Regenerate.
> > >
> > > This patch broke symbol versioning on Fedora 11, and I'm surprised
> > > that the pattern would work on any target.
> >
> > I managed to try only on targets which have a part in parenthesis added.
> > :-/
> >
> > > >+         sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
> > >
> > > The "\(([^)]* *\) " bit requires at minimum "( " which is not
> > > present in GNU ld --version on my system.
> >
> > My first idea would be to stick in another *, as below, but now I'm not
> > so sure this wouldn't allow too much, thus would be able to match
> > wrongly.  Maybe it is better to make a bit longer but more reliable
> > script.
>
> Definitely.  With all the *'s it can match all kinds of unexpected stuff.

What about:

sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/'

?

        Jakub

Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Jakub Jelinek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 26, 2009 at 02:11:29PM +0100, Jakub Jelinek wrote:
> What about:
>
> sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/'
>
> ?

Following patch worked well in Fedora gcc trunk x86_64-linux and i686-linux
bootstrap.

2009-10-26  Jakub Jelinek  <jakub@...>

        PR libstdc++/38923
        * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid using too many
        *s.  Accept ld version without text in ()s.
        * configure: Regenerated.

        * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid using too many
        *s.  Accept ld version without text in ()s.
        * configure: Regenerated.

--- libstdc++-v3/acinclude.m4.jj 2009-10-05 19:43:42.000000000 +0200
+++ libstdc++-v3/acinclude.m4 2009-10-26 18:29:41.000000000 +0100
@@ -210,7 +210,7 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES]
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
     changequote([,])
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
--- libstdc++-v3/configure.jj 2009-10-05 19:43:42.000000000 +0200
+++ libstdc++-v3/configure 2009-10-26 18:30:39.000000000 +0100
@@ -19542,7 +19542,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -26444,7 +26444,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -32259,7 +32259,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -43904,7 +43904,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -44118,7 +44118,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -44593,7 +44593,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -50762,7 +50762,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -56562,7 +56562,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -56729,7 +56729,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -56878,7 +56878,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -57045,7 +57045,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -57217,7 +57217,7 @@ $as_echo_n "checking for ld version... "
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-   sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+   sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
            $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
--- libgomp/acinclude.m4.jj 2009-09-30 09:53:02.000000000 +0200
+++ libgomp/acinclude.m4 2009-10-26 18:26:32.000000000 +0100
@@ -153,7 +153,7 @@ AC_DEFUN([LIBGOMP_CHECK_LINKER_FEATURES]
   fi
   changequote(,)
   ldver=`$LD --version 2>/dev/null |
-         sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
   changequote([,])
   libgomp_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
--- libgomp/configure.jj 2009-10-18 14:53:17.000000000 +0200
+++ libgomp/configure 2009-10-26 18:26:41.000000000 +0100
@@ -15698,7 +15698,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
   fi
 
   ldver=`$LD --version 2>/dev/null |
-         sed -e 's/GNU g*o*ld v*e*r*s*i*o*n* *\(([^)]*)* *\) \([0-9.][0-9.]*\).*/\2/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
   libgomp_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`


        Jakub

Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Ralf Wildenhues :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Jakub Jelinek wrote on Mon, Oct 26, 2009 at 08:16:29PM CET:
> PR libstdc++/38923
> * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid using too many
> *s.  Accept ld version without text in ()s.
> * configure: Regenerated.
>
> * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid using too many
> *s.  Accept ld version without text in ()s.
> * configure: Regenerated.

FWIW, this patch looks good to me, but I cannot approve it.
Thanks for beating me to it, and sorry for not replying sooner.

Cheers,
Ralf

Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.

by Jason Merrill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10/26/2009 03:16 PM, Jakub Jelinek wrote:
> PR libstdc++/38923
> * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid using too many
> *s.  Accept ld version without text in ()s.
> * configure: Regenerated.
>
> * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid using too many
> *s.  Accept ld version without text in ()s.
> * configure: Regenerated.

OK, thanks.

Jason