Patchwork PATCH to acinclude.m4 to fix gas version detection

login
register
mail settings
Submitter Jason Merrill
Date Oct. 4, 2012, 3:40 p.m.
Message ID <506DADF6.7070905@redhat.com>
Download mbox | patch
Permalink /patch/189199/
State New
Headers show

Comments

Jason Merrill - Oct. 4, 2012, 3:40 p.m.
Recent versions of binutils seem to have started putting ' around the 
version number in bfd/configure.in, which was confusing gcc configure. 
This patch allows us to detect the version number again.

OK for trunk?
Hans-Peter Nilsson - Oct. 11, 2012, 1:03 a.m.
On Thu, 4 Oct 2012, Jason Merrill wrote:
> Recent versions of binutils seem to have started putting ' around the version
> number in bfd/configure.in, which was confusing gcc configure. This patch
> allows us to detect the version number again.
>
> OK for trunk?
>

I committed my already-approved patch as r192342 instead (it had
a sanity-check for the extracted version and covered ld as
well).

brgds, H-P

Patch

commit f9ce75775fe4392ee92893c46e89e17dc31bb816
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Oct 4 00:55:33 2012 -0400

    	* acinclude.m4 (_gcc_COMPUTE_GAS_VERSION): Handle ' around version
    	number.
    	* configure: Regenerate.

diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4
index c24464b..d5eb4da 100644
--- a/gcc/acinclude.m4
+++ b/gcc/acinclude.m4
@@ -393,7 +393,7 @@  for f in $gcc_cv_as_bfd_srcdir/configure \
          $gcc_cv_as_gas_srcdir/configure \
          $gcc_cv_as_gas_srcdir/configure.in \
          $gcc_cv_as_gas_srcdir/Makefile.in ; do
-  gcc_cv_gas_version=`sed -n -e 's/^[[ 	]]*\(VERSION=[[0-9]]*\.[[0-9]]*.*\)/\1/p' < $f`
+  gcc_cv_gas_version=`sed -n -e "s/^[[ 	]]*VERSION='*\([[0-9]]*\.[[0-9]]*[^']*\)'*/VERSION=\1/p" < $f`
   if test x$gcc_cv_gas_version != x; then
     break
   fi
diff --git a/gcc/configure b/gcc/configure
index 45bba8e..2d71f7d 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -21237,7 +21237,7 @@  for f in $gcc_cv_as_bfd_srcdir/configure \
          $gcc_cv_as_gas_srcdir/configure \
          $gcc_cv_as_gas_srcdir/configure.in \
          $gcc_cv_as_gas_srcdir/Makefile.in ; do
-  gcc_cv_gas_version=`sed -n -e 's/^[ 	]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
+  gcc_cv_gas_version=`sed -n -e "s/^[[ 	]]*VERSION='*\([[0-9]]*\.[[0-9]]*[^']*\)'*/VERSION=\1/p" < $f`
   if test x$gcc_cv_gas_version != x; then
     break
   fi