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: gnu ld version check in libstdc++-v3/acinclude.m4


On Tue, 20 Feb 2007, Richard Guenther wrote:

> On Tue, 20 Feb 2007, Joseph S. Myers wrote:
> 
> > On Tue, 20 Feb 2007, Richard Guenther wrote:
> > 
> > > !            sed -e 's/GNU ld version \(([^(]*)\)\? \?\([0-9.][0-9.]*\).*/\2/'`
> > 
> > It might be a good idea to remove the check for the word "version" here - 
> > "version" is not part of the GNU Coding Standards --version output so 
> > might go away.  Standard would be more like
> > 
> > GNU ld (GNU Binutils 2.17.50 20070220) 2.17.50
> > 
> > where the text after the last space is the real version number, and 
> > --with-pkgversion replaces the "GNU Binutils 2.17.50 20070220" with your 
> > name and version number for your binutils package.  I simply didn't fix 
> > all pre-existing problems with --version output when adding 
> > --with-pkgversion support.
> 
> That would make the regexp look like
> 
>   sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'

Ok, so the following seems to be the agreed final version.  I bootstrapped
it against one old and one new binutils version and checked that proper
symbol versioning was used.

Ok for mainline and branches (I'll wait a few days with the backport)?

Richard.

2007-02-20  Richard Guenther  <rguenther@suse.de>

	* acinclude.m4: Adjust regular expression for ld version extraction.
	* configure: Regenerate.

Index: acinclude.m4
===================================================================
*** acinclude.m4	(revision 122165)
--- acinclude.m4	(working copy)
*************** AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES]
*** 225,231 ****
    if test x"$with_gnu_ld" = x"yes"; then
      changequote(,)
      ldver=`$LD --version 2>/dev/null | head -1 | \
!            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
      changequote([,])
      glibcxx_gnu_ld_version=`echo $ldver | \
             $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
--- 225,231 ----
    if test x"$with_gnu_ld" = x"yes"; then
      changequote(,)
      ldver=`$LD --version 2>/dev/null | head -1 | \
!            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
      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]