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]

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


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 }'`


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