< prev index next >

make/autoconf/toolchain.m4

Print this page

        

@@ -641,25 +641,18 @@
     LINKER_VERSION_STRING=`$LD 2>&1 | $HEAD -n 1 | $TR -d '\r'`
     # Extract version number
     [ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
         $SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
-    # gcc -Wl,-version output typically looks like:
+    # gcc -Wl,-version output typically looks like
     #   GNU ld (GNU Binutils for Ubuntu) 2.26.1
     #   Copyright (C) 2015 Free Software Foundation, Inc.
     #   This program is free software; [...]
-    # If using gold it will look like:
-    #   GNU gold (GNU Binutils 2.30) 1.15
-    LINKER_VERSION_STRING=`$LD -Wl,--version 2> /dev/null | $HEAD -n 1`
+    LINKER_VERSION_STRING=`$LD -Wl,-version 2>&1 | $HEAD -n 1`
     # Extract version number
-    if [ [[ "$LINKER_VERSION_STRING" == *gold* ]] ]; then
-      [ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
-          $SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*) .*/\1/'` ]
-    else
-      [ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
-          $SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
-    fi
+    [ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
+        $SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
     # clang -Wl,-v output typically looks like
     #   @(#)PROGRAM:ld  PROJECT:ld64-305
     #   configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
     #   Library search paths: [...]
< prev index next >