This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, Jonathan Wakely <jwakely dot gcc at gmail dot com>, Benjamin Kosnik <bkoz at redhat dot com>
- Date: Mon, 26 Oct 2009 14:11:29 +0100
- Subject: Re: PR v3/38923: symbol versioning disabled on Solaris due to sed.
- References: <20090923042126.GA24054@gmx.de> <4AE13A23.8040102@redhat.com> <20091023062514.GB21987@gmx.de> <20091026124908.GA14664@tyan-ft48-01.lab.bos.redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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