[og7,PR,other/79543] Fix GNU ld --version scanning to conform to the GNU Coding Standards

Message ID 877etiwsgb.fsf@hertz.schwinge.homeip.net
State New
Headers show
Series
  • [og7,PR,other/79543] Fix GNU ld --version scanning to conform to the GNU Coding Standards
Related show

Commit Message

Thomas Schwinge Dec. 19, 2017, 5:14 p.m.
Hi!

On Thu, 19 Oct 2017 18:35:09 +0200, I wrote:
> As discussed in <https://gcc.gnu.org/PR79543>: [...]


>     [PR other/79543] Fix GNU ld --version scanning to conform to the GNU Coding Standards


I have not yet addressed Joseph's review comments (thanks!), but to allow
Chung-Lin to make progress with a different issue, I have now pushed my
existing and tested patch to openacc-gcc-7-branch:

commit b32cde83517214d175fc26e345b5ae81518cd4fe
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Wed Oct 18 15:24:46 2017 +0200

    [PR other/79543] Fix GNU ld --version scanning to conform to the GNU Coding Standards
    
            libatomic/
            PR other/79543
            * acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
            scanning to conform to the GNU Coding Standards.
            * configure: Regenerate.
            libffi/
            PR other/79543
            * acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
            scanning to conform to the GNU Coding Standards.
            * configure: Regenerate.
            libgomp/
            PR other/79543
            * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Fix GNU ld
            --version scanning to conform to the GNU Coding Standards.
            * configure: Regenerate.
            libitm/
            PR other/79543
            * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Fix GNU ld
            --version scanning to conform to the GNU Coding Standards.
            * configure: Regenerate.
            libstdc++-v3/
            PR other/79543
            * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld
            --version scanning to conform to the GNU Coding Standards.
            * configure: Regenerate.
---
 libatomic/ChangeLog.openacc    | 17 +++++++++++++++++
 libatomic/acinclude.m4         |  4 ++--
 libatomic/configure            |  2 +-
 libffi/ChangeLog.openacc       | 17 +++++++++++++++++
 libffi/acinclude.m4            |  4 ++--
 libffi/configure               |  2 +-
 libgomp/ChangeLog.openacc      |  7 +++++++
 libgomp/acinclude.m4           |  2 +-
 libgomp/configure              |  2 +-
 libitm/ChangeLog.openacc       | 17 +++++++++++++++++
 libitm/acinclude.m4            |  2 +-
 libitm/configure               |  2 +-
 libstdc++-v3/ChangeLog.openacc | 17 +++++++++++++++++
 libstdc++-v3/acinclude.m4      |  2 +-
 libstdc++-v3/configure         | 24 ++++++++++++------------
 15 files changed, 98 insertions(+), 23 deletions(-)



Grüße
 Thomas

Patch

diff --git libatomic/ChangeLog.openacc libatomic/ChangeLog.openacc
new file mode 100644
index 0000000..406c5bc
--- /dev/null
+++ libatomic/ChangeLog.openacc
@@ -0,0 +1,17 @@ 
+2017-12-19  Thomas Schwinge  <thomas@codesourcery.com>
+
+	PR other/79543
+	* acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
+	scanning to conform to the GNU Coding Standards.
+	* configure: Regenerate.
+
+Copyright (C) 2017 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+change-log-default-name: "ChangeLog.openacc"
+End:
diff --git libatomic/acinclude.m4 libatomic/acinclude.m4
index 485d731..1734d75 100644
--- libatomic/acinclude.m4
+++ libatomic/acinclude.m4
@@ -335,7 +335,7 @@  AC_DEFUN([LIBAT_CHECK_LINKER_FEATURES], [
   fi
   changequote(,)
   ldver=`$LD --version 2>/dev/null |
-         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/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
   changequote([,])
   libat_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
@@ -437,7 +437,7 @@  AC_DEFUN([LIBAT_CHECK_LINKER_FEATURES], [
   fi
   changequote(,)
   ldver=`$LD --version 2>/dev/null |
-         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/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
   changequote([,])
   libat_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
diff --git libatomic/configure libatomic/configure
index c05fc9d..db8b3d1 100755
--- libatomic/configure
+++ libatomic/configure
@@ -14867,7 +14867,7 @@  with_gnu_ld=$lt_cv_prog_gnu_ld
   fi
 
   ldver=`$LD --version 2>/dev/null |
-         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/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
   libat_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
diff --git libffi/ChangeLog.openacc libffi/ChangeLog.openacc
new file mode 100644
index 0000000..406c5bc
--- /dev/null
+++ libffi/ChangeLog.openacc
@@ -0,0 +1,17 @@ 
+2017-12-19  Thomas Schwinge  <thomas@codesourcery.com>
+
+	PR other/79543
+	* acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
+	scanning to conform to the GNU Coding Standards.
+	* configure: Regenerate.
+
+Copyright (C) 2017 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+change-log-default-name: "ChangeLog.openacc"
+End:
diff --git libffi/acinclude.m4 libffi/acinclude.m4
index 270dadf..0f2c1ea 100644
--- libffi/acinclude.m4
+++ libffi/acinclude.m4
@@ -178,7 +178,7 @@  AC_DEFUN([LIBAT_CHECK_LINKER_FEATURES], [
   fi
   changequote(,)
   ldver=`$LD --version 2>/dev/null |
-         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/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
   changequote([,])
   libat_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
@@ -280,7 +280,7 @@  AC_DEFUN([LIBAT_CHECK_LINKER_FEATURES], [
   fi
   changequote(,)
   ldver=`$LD --version 2>/dev/null |
-         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/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
   changequote([,])
   libat_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
diff --git libffi/configure libffi/configure
index 74b747b..f82fe11 100755
--- libffi/configure
+++ libffi/configure
@@ -16167,7 +16167,7 @@  with_gnu_ld=$lt_cv_prog_gnu_ld
   fi
 
   ldver=`$LD --version 2>/dev/null |
-         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/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
   libat_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
diff --git libgomp/ChangeLog.openacc libgomp/ChangeLog.openacc
index ca39034..4bddaa2 100644
--- libgomp/ChangeLog.openacc
+++ libgomp/ChangeLog.openacc
@@ -1,3 +1,10 @@ 
+2017-12-19  Thomas Schwinge  <thomas@codesourcery.com>
+
+	PR other/79543
+	* acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Fix GNU ld
+	--version scanning to conform to the GNU Coding Standards.
+	* configure: Regenerate.
+
 2017-12-01  Cesar Philippidis  <cesar@codesourcery.com>
 
 	Backport from trunk:
diff --git libgomp/acinclude.m4 libgomp/acinclude.m4
index d43aa88..d9d9da8 100644
--- libgomp/acinclude.m4
+++ libgomp/acinclude.m4
@@ -153,7 +153,7 @@  AC_DEFUN([LIBGOMP_CHECK_LINKER_FEATURES], [
   fi
   changequote(,)
   ldver=`$LD --version 2>/dev/null |
-         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/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
   changequote([,])
   libgomp_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
diff --git libgomp/configure libgomp/configure
index ac52d89..11f5b0b 100755
--- libgomp/configure
+++ libgomp/configure
@@ -16254,7 +16254,7 @@  with_gnu_ld=$lt_cv_prog_gnu_ld
   fi
 
   ldver=`$LD --version 2>/dev/null |
-         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/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
   libgomp_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
diff --git libitm/ChangeLog.openacc libitm/ChangeLog.openacc
new file mode 100644
index 0000000..0b9334c
--- /dev/null
+++ libitm/ChangeLog.openacc
@@ -0,0 +1,17 @@ 
+2017-12-19  Thomas Schwinge  <thomas@codesourcery.com>
+
+	PR other/79543
+	* acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Fix GNU ld
+	--version scanning to conform to the GNU Coding Standards.
+	* configure: Regenerate.
+
+Copyright (C) 2017 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+change-log-default-name: "ChangeLog.openacc"
+End:
diff --git libitm/acinclude.m4 libitm/acinclude.m4
index c81b3e9..7c26756 100644
--- libitm/acinclude.m4
+++ libitm/acinclude.m4
@@ -246,7 +246,7 @@  AC_DEFUN([LIBITM_CHECK_LINKER_FEATURES], [
   fi
   changequote(,)
   ldver=`$LD --version 2>/dev/null |
-         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/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
   changequote([,])
   libitm_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
diff --git libitm/configure libitm/configure
index 775f370..1ce18fd 100644
--- libitm/configure
+++ libitm/configure
@@ -16828,7 +16828,7 @@  fi
   fi
 
   ldver=`$LD --version 2>/dev/null |
-         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/; q'`
+         sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
   libitm_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
diff --git libstdc++-v3/ChangeLog.openacc libstdc++-v3/ChangeLog.openacc
new file mode 100644
index 0000000..8e1c10f
--- /dev/null
+++ libstdc++-v3/ChangeLog.openacc
@@ -0,0 +1,17 @@ 
+2017-12-19  Thomas Schwinge  <thomas@codesourcery.com>
+
+	PR other/79543
+	* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld
+	--version scanning to conform to the GNU Coding Standards.
+	* configure: Regenerate.
+
+Copyright (C) 2017 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+change-log-default-name: "ChangeLog.openacc"
+End:
diff --git libstdc++-v3/acinclude.m4 libstdc++-v3/acinclude.m4
index 805148d..3bafc53 100644
--- libstdc++-v3/acinclude.m4
+++ libstdc++-v3/acinclude.m4
@@ -219,7 +219,7 @@  AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
     changequote([,])
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
diff --git libstdc++-v3/configure libstdc++-v3/configure
index e70fdd6..e03de1a 100755
--- libstdc++-v3/configure
+++ libstdc++-v3/configure
@@ -21961,7 +21961,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -29106,7 +29106,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -35100,7 +35100,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -41220,7 +41220,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -53141,7 +53141,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -53372,7 +53372,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -53847,7 +53847,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -60200,7 +60200,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -66116,7 +66116,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -66283,7 +66283,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -66511,7 +66511,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -72425,7 +72425,7 @@  $as_echo_n "checking for ld version... " >&6; }
       glibcxx_ld_is_gold=yes
     fi
     ldver=`$LD --version 2>/dev/null |
-	   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/; q'`
+	   sed -e 's/GNU gold /GNU ld /;s/GNU ld .* \(.*\)/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
 	   $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`