This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR v3/38923: symbol versioning disabled on Solaris due to sed.
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: libstdc++ at gcc dot gnu dot org, Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Date: Wed, 23 Sep 2009 06:21:26 +0200
- Subject: PR v3/38923: symbol versioning disabled on Solaris due to sed.
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@gmx.de>
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@gmx.de>
* 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 }'`