acinclude.m4 (_gcc_COMPUTE_GAS_VERSION): Allow a single character to quote the VERSION= contents.

* acinclude.m4 (_gcc_COMPUTE_GAS_VERSION): Allow a single
	character to quote the VERSION= contents.  Sanity-check contents.
	* configure.ac ("what linker to use" ld version extraction): Ditto.
	* configure: Regenerate.

From-SVN: r192342
This commit is contained in:
Hans-Peter Nilsson 2012-10-11 00:52:26 +00:00 committed by Hans-Peter Nilsson
parent f4ffd85777
commit 81179208c0
4 changed files with 29 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2012-10-11 Hans-Peter Nilsson <hp@bitrange.com>
* acinclude.m4 (_gcc_COMPUTE_GAS_VERSION): Allow a single
character to quote the VERSION= contents. Sanity-check contents.
* configure.ac ("what linker to use" ld version extraction): Ditto.
* configure: Regenerate.
2012-10-10 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.h (PRINT_OPERAND_PUNCT_VALID_P):

View file

@ -393,11 +393,15 @@ 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-9A-Za-z_]]*\([[0-9]]*\.[[0-9]]*.*\)/VERSION=\1/p' < $f`
if test x$gcc_cv_gas_version != x; then
break
fi
done
case $gcc_cv_gas_version in
VERSION=[[0-9]]*) ;;
*) AC_MSG_ERROR([[cannot find version of in-tree assembler]]);;
esac
gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([[0-9]]*\)"`
gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.\([[0-9]]*\)"`
gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)"`

12
gcc/configure vendored
View file

@ -21237,11 +21237,15 @@ 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-9A-Za-z_]*\([0-9]*\.[0-9]*.*\)/VERSION=\1/p' < $f`
if test x$gcc_cv_gas_version != x; then
break
fi
done
case $gcc_cv_gas_version in
VERSION=[0-9]*) ;;
*) as_fn_error "cannot find version of in-tree assembler" "$LINENO" 5;;
esac
gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
@ -21395,11 +21399,15 @@ $as_echo "newly built ld" >&6; }
fi
for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in
do
gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
gcc_cv_gld_version=`sed -n -e 's/^[ ]*VERSION=[^0-9A-Za-z_]*\([0-9]*\.[0-9]*.*\)/VERSION=\1/p' < $f`
if test x$gcc_cv_gld_version != x; then
break
fi
done
case $gcc_cv_gld_version in
VERSION=[0-9]*) ;;
*) as_fn_error "cannot find version of in-tree linker" "$LINENO" 5 ;;
esac
gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
else

View file

@ -2049,11 +2049,17 @@ if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext \
for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in
do
changequote(,)dnl
gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
gcc_cv_gld_version=`sed -n -e 's/^[ ]*VERSION=[^0-9A-Za-z_]*\([0-9]*\.[0-9]*.*\)/VERSION=\1/p' < $f`
if test x$gcc_cv_gld_version != x; then
break
fi
done
case $gcc_cv_gld_version in
VERSION=[0-9]*) ;;
changequote([,])dnl
*) AC_MSG_ERROR([[cannot find version of in-tree linker]]) ;;
changequote(,)dnl
esac
gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
changequote([,])dnl