]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
configure.in: Fix as version test for binutils 2.12.1 releases (without dates).
authorJakub Jelinek <jakub@gcc.gnu.org>
Thu, 23 May 2002 08:01:58 +0000 (10:01 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 23 May 2002 08:01:58 +0000 (10:01 +0200)
* configure.in: Fix as version test for binutils 2.12.1 releases
(without dates).
* configure: Rebuilt.

From-SVN: r53774

gcc/ChangeLog
gcc/configure
gcc/configure.in

index da4d752fd92391c33d9e88428a94c01c4c8f54b1..dd269fa9485897c72a6e31a6a9c96da975610a76 100644 (file)
@@ -1,10 +1,16 @@
-Wed May 22 14:16:07 CEST 2002JanHUbicka  <jh@suse.cz>
+2002-05-23  Jakub Jelinek  <jakub@redhat.com>
+
+       * configure.in: Fix as version test for binutils 2.12.1 releases
+       (without dates).
+       * configure: Rebuilt.
+
+Wed May 22 14:16:07 CEST 2002  Jan Hubicka  <jh@suse.cz>
 
        * i386.c  (expand_movstr, expand_clrstr): Fix inline-all-stringops
        sequence.
        (ix86_expand_clrstr): Fix typo.
 
-2002-05-22  Duraid Madina   <duraid@fl.net.au>
+2002-05-22  Duraid Madina  <duraid@fl.net.au>
 
        * tradcpp.c (fixup_newlines): Use old-style function header.
 
index 253fa40fda7d2fc5decce5bc115d2dc593555e5a..763b6785c6c9d0264d5d07942d2d988744116985 100755 (executable)
@@ -7189,9 +7189,29 @@ elif test x$gcc_cv_as != x; then
        # the date string after the version number.
        ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
        if echo "$ld_ver" | grep GNU > /dev/null; then
+               ld_vers=`echo $ld_ver | sed -n 's,^.*[  ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([     ].*\|\)$,\1,p'`
                ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
                if test 0"$ld_date" -lt 20020404; then
-                       gcc_cv_as_hidden="no"
+                       if test -n "$ld_date"; then
+                               # If there was date string, but was earlier than 2002-04-04, fail
+                               gcc_cv_as_hidden="no"
+                       elif test -z "$ld_vers"; then
+                               # If there was no date string nor ld version number, something is wrong
+                               gcc_cv_as_hidden="no"
+                       else
+                               ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
+                               ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
+                               ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
+                               test -z "$ld_vers_patch" && ld_vers_patch=0
+                               if test "$ld_vers_major" -lt 2; then
+                                       gcc_cv_as_hidden="no"
+                               elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
+                                       gcc_cv_as_hidden="no"
+                               elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
+                                         -a "$ld_vers_patch" -eq 0; then
+                                       gcc_cv_as_hidden="no"
+                               fi
+                       fi
                fi
        fi
 fi
index 8893ed61d5835e70aa65885819848ec5a353bbbc..850e4bdd84850f6fb0adca87187d080b37ce824b 100644 (file)
@@ -1525,11 +1525,31 @@ elif test x$gcc_cv_as != x; then
        ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
        if echo "$ld_ver" | grep GNU > /dev/null; then
 changequote(,)dnl
+               ld_vers=`echo $ld_ver | sed -n 's,^.*[  ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([     ].*\|\)$,\1,p'`
                ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
-changequote([,])dnl
                if test 0"$ld_date" -lt 20020404; then
-                       gcc_cv_as_hidden="no"
+                       if test -n "$ld_date"; then
+                               # If there was date string, but was earlier than 2002-04-04, fail
+                               gcc_cv_as_hidden="no"
+                       elif test -z "$ld_vers"; then
+                               # If there was no date string nor ld version number, something is wrong
+                               gcc_cv_as_hidden="no"
+                       else
+                               ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
+                               ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
+                               ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
+                               test -z "$ld_vers_patch" && ld_vers_patch=0
+                               if test "$ld_vers_major" -lt 2; then
+                                       gcc_cv_as_hidden="no"
+                               elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
+                                       gcc_cv_as_hidden="no"
+                               elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
+                                         -a "$ld_vers_patch" -eq 0; then
+                                       gcc_cv_as_hidden="no"
+                               fi
+                       fi
                fi
+changequote([,])dnl
        fi
 fi