From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9930 invoked by alias); 7 Feb 2003 02:16:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 9891 invoked by uid 71); 7 Feb 2003 02:16:00 -0000 Date: Fri, 07 Feb 2003 02:16:00 -0000 Message-ID: <20030207021600.9890.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Greg Schafer Subject: Re: other/9479: ld --version parsing in gcc configury fails on latest FSF binutils-2.13.2.1 Reply-To: Greg Schafer X-SW-Source: 2003-02/txt/msg00341.txt.bz2 List-Id: The following reply was made to PR other/9479; it has been noted by GNATS. From: Greg Schafer To: gcc-gnats@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org Subject: Re: other/9479: ld --version parsing in gcc configury fails on latest FSF binutils-2.13.2.1 Date: Fri, 7 Feb 2003 13:14:55 +1100 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Here is a better patch that also allows for binutils version strings with 5 or more digits (a la HJL binutils releases). The initial patch WAS applied to the gcc-3.2 branch before the release of gcc-3.2.2 so the immediate problem was fixed. However, this new patch should fix the problem for ever more and therefore should be applied to all branches (3.2, 3.3 & 3.4). As of this writing, the current FSF binutils release is still 2.23.2.1 so people using that version with gcc-3.3 & 3.4 are building subtley broken gcc's. There are 2 patches below. The 1st will apply to 3.4 & 3.3. The second will apply to 3.2 Patch this time supplied by:- Dan Osterrath I have tested it by throwing various strings at the regex and it does the right thing in all cases. Greg --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="gcc.patch.new.3.4" diff -uNr gcc.orig/gcc/configure.in gcc/gcc/configure.in --- gcc.orig/gcc/configure.in 2003-02-07 12:49:24.000000000 +1100 +++ gcc/gcc/configure.in 2003-02-07 12:53:34.000000000 +1100 @@ -1675,7 +1675,7 @@ 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_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 if test -n "$ld_date"; then --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="gcc.patch.new.3.2" diff -uNr gcc.orig/gcc/configure.in gcc/gcc/configure.in --- gcc.orig/gcc/configure.in 2003-02-05 13:44:33.000000000 +1100 +++ gcc/gcc/configure.in 2003-02-07 13:11:02.000000000 +1100 @@ -1537,7 +1537,7 @@ 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]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'` + 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 if test -n "$ld_date"; then --gBBFr7Ir9EOA20Yy--