This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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.


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


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