This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


* 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 }'`



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]