gnu ld version check in libstdc++-v3/acinclude.m4

Richard Guenther rguenther@suse.de
Tue Feb 20 12:30:00 GMT 2007


It looks like binutils recently changed the formatting of it's version
string with introducing --with-pkgversion.  This causes the configure
check for symbol versioning to fail for libstdc++.

In particular we now have

> ld --version 
GNU ld version (SUSE Linux) 2.17.50.20070219 20070219

instead of

ld --version
GNU ld version 2.17.50.0.5 20060927 (SUSE Linux)

The following happens to catch both new and old binutils version strings.

Ok for mainline and active branches?  Or better suggestions?

Thanks,
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 122127)
--- acinclude.m4	(working copy)
*************** AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES]
*** 235,241 ****
      AC_MSG_CHECKING([for ld version])
      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 }'`
--- 235,241 ----
      AC_MSG_CHECKING([for ld version])
      changequote(,)
      ldver=`$LD --version 2>/dev/null | head -1 | \
!            sed -e 's/GNU ld version \(([^(]*)\)\? \?\([0-9.][0-9.]*\).*/\2/'`
      changequote([,])
      glibcxx_gnu_ld_version=`echo $ldver | \
             $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`



More information about the Libstdc++ mailing list