summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2013-12-05 12:36:40 -0800
committerH.J. Lu <hjl.tools@gmail.com>2013-12-05 15:45:52 -0800
commit9da599705cd8255566b77bb1cfeadbd46ad71f31 (patch)
tree184de6c3078cc752ed122fb1c19e6367187d28d0
parente31f1d814bdcf4d9ae47b8a9a542e553fd0c4d8b (diff)
downloadgcc-hjl/libsanitizer.tar.gz
Use gas version check in gcc-setup.m4hjl/libsanitizer
-rw-r--r--config/gcc-setup.m414
-rwxr-xr-xconfigure21
-rw-r--r--gcc/acinclude.m437
-rwxr-xr-xgcc/configure329
-rw-r--r--gcc/configure.ac76
5 files changed, 185 insertions, 292 deletions
diff --git a/config/gcc-setup.m4 b/config/gcc-setup.m4
index fa5611d148e..b788126efec 100644
--- a/config/gcc-setup.m4
+++ b/config/gcc-setup.m4
@@ -185,17 +185,6 @@ AC_DEFUN([GCC_SETUP], [
fi
fi
- AC_MSG_CHECKING([whether a default assembler was specified])
- if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
- if test x"$gas_flag" = x"no"; then
- AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER)])
- else
- AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER - GNU as)])
- fi
- else
- AC_MSG_RESULT(no)
- fi
-
dnl Identify the assembler which will work hand-in-glove with the newly
dnl built GCC, so that we can examine its features. This is the assembler
dnl which will be driven by the driver program.
@@ -298,6 +287,9 @@ AC_DEFUN([GCC_SETUP], [
"") gcc_cv_gas_patch_version="0" ;;
esac
AC_MSG_RESULT([$gcc_cv_gas_major_version.$gcc_cv_gas_minor_version.$gcc_cv_gas_patch_version])
+ gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
+ + $gcc_cv_gas_minor_version \) \* 1000 \
+ + $gcc_cv_gas_patch_version`
fi
dnl Determine the version of glibc, if any, used on the target.
diff --git a/configure b/configure
index 5c09a196f06..537e7a6b11c 100755
--- a/configure
+++ b/configure
@@ -14836,21 +14836,6 @@ fi
fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default assembler was specified" >&5
-$as_echo_n "checking whether a default assembler was specified... " >&6; }
- if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
- if test x"$gas_flag" = x"no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER)" >&5
-$as_echo "yes ($DEFAULT_ASSEMBLER)" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
-$as_echo "yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; }
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
gcc_cv_gas_major_version=
gcc_cv_gas_minor_version=
@@ -14984,11 +14969,11 @@ $as_echo_n "checking for GNU binutils version... " >&6; }
case $gcc_cv_gas_patch_version in
"") gcc_cv_gas_patch_version="0" ;;
esac
- gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
- + $gcc_cv_gas_minor_version \) \* 1000 \
- + $gcc_cv_gas_patch_version`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_gas_major_version.$gcc_cv_gas_minor_version.$gcc_cv_gas_patch_version" >&5
$as_echo "$gcc_cv_gas_major_version.$gcc_cv_gas_minor_version.$gcc_cv_gas_patch_version" >&6; }
+ gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
+ + $gcc_cv_gas_minor_version \) \* 1000 \
+ + $gcc_cv_gas_patch_version`
fi
diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4
index 34de2075bf2..a84efd7f0b3 100644
--- a/gcc/acinclude.m4
+++ b/gcc/acinclude.m4
@@ -380,38 +380,6 @@ if test $enable_initfini_array = yes; then
[Define .init_array/.fini_array sections are available and working.])
fi])
-dnl # _gcc_COMPUTE_GAS_VERSION
-dnl # Used by gcc_GAS_VERSION_GTE_IFELSE
-dnl #
-dnl # WARNING:
-dnl # gcc_cv_as_gas_srcdir must be defined before this.
-dnl # This gross requirement will go away eventually.
-AC_DEFUN([_gcc_COMPUTE_GAS_VERSION],
-[gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
-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-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]]*\)"`
-case $gcc_cv_gas_patch_version in
- "") gcc_cv_gas_patch_version="0" ;;
-esac
-gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
- + $gcc_cv_gas_minor_version \) \* 1000 \
- + $gcc_cv_gas_patch_version`
-]) []dnl # _gcc_COMPUTE_GAS_VERSION
-
dnl # gcc_GAS_VERSION_GTE_IFELSE([elf,] major, minor, patchlevel,
dnl # [command_if_true = :], [command_if_false = :])
dnl # Check to see if the version of GAS is greater than or
@@ -433,9 +401,8 @@ ifelse([$6],,,[
fi])
AC_DEFUN([gcc_GAS_VERSION_GTE_IFELSE],
-[AC_REQUIRE([_gcc_COMPUTE_GAS_VERSION])dnl
-ifelse([$1], elf, [_gcc_GAS_VERSION_GTE_IFELSE($@)],
- [_gcc_GAS_VERSION_GTE_IFELSE(,$@)])])
+[ifelse([$1], elf, [_gcc_GAS_VERSION_GTE_IFELSE($@)],
+ [_gcc_GAS_VERSION_GTE_IFELSE(,$@)])])
dnl # gcc_GAS_FLAGS
dnl # Used by gcc_GAS_CHECK_FEATURE
diff --git a/gcc/configure b/gcc/configure
index deffc6faec6..ea8197b838b 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -688,7 +688,6 @@ ORIGINAL_LD_FOR_TARGET
ORIGINAL_PLUGIN_LD_FOR_TARGET
gcc_cv_ld
ORIGINAL_AS_FOR_TARGET
-gcc_cv_as
enable_fast_install
objdir
OTOOL64
@@ -807,6 +806,7 @@ SYSROOT_CFLAGS_FOR_TARGET
AWK
EGREP
GREP
+gcc_cv_as
target_subdir
host_subdir
build_subdir
@@ -871,6 +871,8 @@ with_local_prefix
with_native_system_header_dir
with_build_sysroot
with_sysroot
+with_gnu_as
+with_as
with_glibc_version
with_kernel_version
with_gxx_include_dir
@@ -879,8 +881,6 @@ enable_generated_files_in_srcdir
with_gnu_ld
with_ld
with_demangler_in_ld
-with_gnu_as
-with_as
enable_largefile
enable_build_format_warnings
enable_werror_always
@@ -1665,6 +1665,8 @@ Optional Packages:
--with-build-sysroot=sysroot
use sysroot as the system root during the build
--with-sysroot[=DIR] search for usr/lib, usr/include, et al, within DIR
+ --with-gnu-as arrange to work with GNU as
+ --with-as arrange to use the specified as (full pathname)
--with-glibc-version=M.N
assume GCC used with glibc version M.N or later
--with-kernel-version=M.N.P
@@ -1678,8 +1680,6 @@ Optional Packages:
--with-gnu-ld arrange to work with GNU ld
--with-ld arrange to use the specified ld (full pathname)
--with-demangler-in-ld try to use demangler in GNU ld
- --with-gnu-as arrange to work with GNU as
- --with-as arrange to use the specified as (full pathname)
--with-stabs arrange to use stabs instead of host debug format
--with-dwarf2 force the default debug format to be DWARF 2
--with-specs=SPECS add SPECS to driver command-line processing
@@ -3631,6 +3631,170 @@ fi
fi
+
+# Check whether --with-gnu-as was given.
+if test "${with_gnu_as+set}" = set; then :
+ withval=$with_gnu_as; gas_flag="$with_gnu_as"
+else
+ gas_flag=no
+fi
+
+
+
+# Check whether --with-as was given.
+if test "${with_as+set}" = set; then :
+ withval=$with_as; DEFAULT_ASSEMBLER="$with_as"
+fi
+
+ if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
+ if test ! -x "$DEFAULT_ASSEMBLER"; then
+ as_fn_error "cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" "$LINENO" 5
+ elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
+ gas_flag=yes
+ fi
+ fi
+
+
+ gcc_cv_gas_major_version=
+ gcc_cv_gas_minor_version=
+ gcc_cv_gas_patch_version=
+ gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
+
+ in_tree_gas=
+ if test -f $srcdir/config/gcc-setup.m4; then
+ toplevel=yes
+ case " $noconfigdirs " in
+ *" gas "*)
+ in_tree_gas=no
+ esac
+ else
+ toplevel=no
+ fi
+
+ if test "${gcc_cv_as+set}" = set; then :
+
+else
+
+ if test -x "$DEFAULT_ASSEMBLER"; then
+ gcc_cv_as="$DEFAULT_ASSEMBLER"
+ elif test -f $gcc_cv_as_gas_srcdir/configure.in \
+ && (test -f ../gas/Makefile \
+ || test x"$in_tree_gas" != x"no")\
+ && test x$build = x$host; then
+ gcc_cv_as=../gas/as-new$build_exeext
+ elif test -x as$build_exeext; then
+ gcc_cv_as=./as$build_exeext
+ elif test $toplevel = "no"; then
+ if ( set dummy $AS_FOR_TARGET; test -x $2 ); then
+ gcc_cv_as="$AS_FOR_TARGET"
+ else
+ # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
+set dummy $AS_FOR_TARGET; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_gcc_cv_as+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $gcc_cv_as in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+gcc_cv_as=$ac_cv_path_gcc_cv_as
+if test -n "$gcc_cv_as"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
+$as_echo "$gcc_cv_as" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ elif test "$AS_FOR_TARGET" = "\$(AS)"; then
+ gcc_cv_as="$AS"
+ else
+ as_fn_error "cannot find assembler" "$LINENO" 5
+ fi
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking what assembler to use" >&5
+$as_echo_n "checking what assembler to use... " >&6; }
+ if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built gas" >&5
+$as_echo "newly built gas" >&6; }
+ in_tree_gas=yes
+ gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
+ 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-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]*\)"`
+ in_tree_gas_is_elf=no
+ if test $toplevel = "no" \
+ && (grep 'obj_format = elf' ../gas/Makefile > /dev/null \
+ || (grep 'obj_format = multi' ../gas/Makefile \
+ && grep 'extra_objects =.* obj-elf' ../gas/Makefile)) > /dev/null
+ then
+ in_tree_gas_is_elf=yes
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
+$as_echo "$gcc_cv_as" >&6; }
+ in_tree_gas=no
+ as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
+ if echo "$as_ver" | grep GNU > /dev/null; then
+ as_vers=`echo $as_ver | sed -n \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
+ gcc_cv_gas_major_version=`expr "$as_vers" : '\([0-9]*\)'`
+ gcc_cv_gas_minor_version=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
+ gcc_cv_gas_patch_version=`expr "$as_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
+ fi
+ fi
+
+ if test x$gcc_cv_gas_major_version != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU binutils version" >&5
+$as_echo_n "checking for GNU binutils version... " >&6; }
+ case $gcc_cv_gas_patch_version in
+ "") gcc_cv_gas_patch_version="0" ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_gas_major_version.$gcc_cv_gas_minor_version.$gcc_cv_gas_patch_version" >&5
+$as_echo "$gcc_cv_gas_major_version.$gcc_cv_gas_minor_version.$gcc_cv_gas_patch_version" >&6; }
+ gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
+ + $gcc_cv_gas_minor_version \) \* 1000 \
+ + $gcc_cv_gas_patch_version`
+ fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target glibc version" >&5
$as_echo_n "checking for target glibc version... " >&6; }
@@ -3840,32 +4004,7 @@ else
fi
-# ----------------------
-# Find default assembler
-# ----------------------
-
-# With GNU as
-
-# Check whether --with-gnu-as was given.
-if test "${with_gnu_as+set}" = set; then :
- withval=$with_gnu_as; gas_flag="$with_gnu_as"
-else
- gas_flag=no
-fi
-
-
-
-# Check whether --with-as was given.
-if test "${with_as+set}" = set; then :
- withval=$with_as; DEFAULT_ASSEMBLER="$with_as"
-fi
-
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
- if test ! -x "$DEFAULT_ASSEMBLER"; then
- as_fn_error "cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" "$LINENO" 5
- elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
- gas_flag=yes
- fi
cat >>confdefs.h <<_ACEOF
#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
@@ -18050,7 +18189,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18053 "configure"
+#line 18192 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18156,7 +18295,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18159 "configure"
+#line 18298 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -21410,76 +21549,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# Identify the assembler which will work hand-in-glove with the newly
-# built GCC, so that we can examine its features. This is the assembler
-# which will be driven by the driver program.
-#
-# If build != host, and we aren't building gas in-tree, we identify a
-# build->target assembler and hope that it will have the same features
-# as the host->target assembler we'll be using.
-gcc_cv_gas_major_version=
-gcc_cv_gas_minor_version=
-gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
-
-if test "${gcc_cv_as+set}" = set; then :
-
-else
-
-if test -x "$DEFAULT_ASSEMBLER"; then
- gcc_cv_as="$DEFAULT_ASSEMBLER"
-elif test -f $gcc_cv_as_gas_srcdir/configure.in \
- && test -f ../gas/Makefile \
- && test x$build = x$host; then
- gcc_cv_as=../gas/as-new$build_exeext
-elif test -x as$build_exeext; then
- # Build using assembler in the current directory.
- gcc_cv_as=./as$build_exeext
-elif ( set dummy $AS_FOR_TARGET; test -x $2 ); then
- gcc_cv_as="$AS_FOR_TARGET"
-else
- # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
-set dummy $AS_FOR_TARGET; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_gcc_cv_as+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $gcc_cv_as in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-gcc_cv_as=$ac_cv_path_gcc_cv_as
-if test -n "$gcc_cv_as"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
-$as_echo "$gcc_cv_as" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-fi
-
ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
case "$ORIGINAL_AS_FOR_TARGET" in
@@ -21488,52 +21557,6 @@ case "$ORIGINAL_AS_FOR_TARGET" in
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what assembler to use" >&5
-$as_echo_n "checking what assembler to use... " >&6; }
-if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
- # Single tree build which includes gas. We want to prefer it
- # over whatever linker top-level may have detected, since
- # we'll use what we're building after installation anyway.
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built gas" >&5
-$as_echo "newly built gas" >&6; }
- in_tree_gas=yes
- gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
-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-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]*\)"`
-case $gcc_cv_gas_patch_version in
- "") gcc_cv_gas_patch_version="0" ;;
-esac
-gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
- + $gcc_cv_gas_minor_version \) \* 1000 \
- + $gcc_cv_gas_patch_version`
-
- in_tree_gas_is_elf=no
- if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
- || (grep 'obj_format = multi' ../gas/Makefile \
- && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
- then
- in_tree_gas_is_elf=yes
- fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as" >&5
-$as_echo "$gcc_cv_as" >&6; }
- in_tree_gas=no
-fi
-
default_ld=
# Check whether --enable-ld was given.
if test "${enable_ld+set}" = set; then :
@@ -22682,13 +22705,9 @@ L2:' > conftest.s
# ??? There exists an elf-specific test that will crash
# the assembler. Perhaps it's better to figure out whether
# arbitrary sections are supported and try the test.
- as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
- if echo "$as_ver" | grep GNU > /dev/null; then
- as_vers=`echo $as_ver | sed -n \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
- as_major=`expr "$as_vers" : '\([0-9]*\)'`
- as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
- if test $as_major -eq 2 && test $as_minor -lt 11
+ if test x$gcc_cv_gas_major_version != x; then
+ if test $gcc_cv_gas_major_version -eq 2 \
+ && test $gcc_cv_gas_minor_version -lt 11
then :
else gcc_cv_as_leb128=yes
fi
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 4bac309653d..8ba9978cc90 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -227,25 +227,7 @@ AC_ARG_WITH(demangler-in-ld,
demangler_in_ld="$with_demangler_in_ld",
demangler_in_ld=yes)
-# ----------------------
-# Find default assembler
-# ----------------------
-
-# With GNU as
-AC_ARG_WITH(gnu-as,
-[AS_HELP_STRING([--with-gnu-as], [arrange to work with GNU as])],
-gas_flag="$with_gnu_as",
-gas_flag=no)
-
-AC_ARG_WITH(as,
-[AS_HELP_STRING([--with-as], [arrange to use the specified as (full pathname)])],
-DEFAULT_ASSEMBLER="$with_as")
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
- if test ! -x "$DEFAULT_ASSEMBLER"; then
- AC_MSG_ERROR([cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER])
- elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
- gas_flag=yes
- fi
AC_DEFINE_UNQUOTED(DEFAULT_ASSEMBLER,"$DEFAULT_ASSEMBLER",
[Define to enable the use of a default assembler.])
fi
@@ -1834,34 +1816,6 @@ AC_PROG_LIBTOOL
AC_SUBST(objdir)
AC_SUBST(enable_fast_install)
-# Identify the assembler which will work hand-in-glove with the newly
-# built GCC, so that we can examine its features. This is the assembler
-# which will be driven by the driver program.
-#
-# If build != host, and we aren't building gas in-tree, we identify a
-# build->target assembler and hope that it will have the same features
-# as the host->target assembler we'll be using.
-gcc_cv_gas_major_version=
-gcc_cv_gas_minor_version=
-gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
-
-m4_pattern_allow([AS_FOR_TARGET])dnl
-AS_VAR_SET_IF(gcc_cv_as,, [
-if test -x "$DEFAULT_ASSEMBLER"; then
- gcc_cv_as="$DEFAULT_ASSEMBLER"
-elif test -f $gcc_cv_as_gas_srcdir/configure.in \
- && test -f ../gas/Makefile \
- && test x$build = x$host; then
- gcc_cv_as=../gas/as-new$build_exeext
-elif test -x as$build_exeext; then
- # Build using assembler in the current directory.
- gcc_cv_as=./as$build_exeext
-elif ( set dummy $AS_FOR_TARGET; test -x $[2] ); then
- gcc_cv_as="$AS_FOR_TARGET"
-else
- AC_PATH_PROG(gcc_cv_as, $AS_FOR_TARGET)
-fi])
-
ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
AC_SUBST(ORIGINAL_AS_FOR_TARGET)
case "$ORIGINAL_AS_FOR_TARGET" in
@@ -1869,26 +1823,6 @@ case "$ORIGINAL_AS_FOR_TARGET" in
*) AC_CONFIG_FILES(as:exec-tool.in, [chmod +x as]) ;;
esac
-AC_MSG_CHECKING(what assembler to use)
-if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
- # Single tree build which includes gas. We want to prefer it
- # over whatever linker top-level may have detected, since
- # we'll use what we're building after installation anyway.
- AC_MSG_RESULT(newly built gas)
- in_tree_gas=yes
- _gcc_COMPUTE_GAS_VERSION
- in_tree_gas_is_elf=no
- if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
- || (grep 'obj_format = multi' ../gas/Makefile \
- && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
- then
- in_tree_gas_is_elf=yes
- fi
-else
- AC_MSG_RESULT($gcc_cv_as)
- in_tree_gas=no
-fi
-
default_ld=
AC_ARG_ENABLE(ld,
[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]],
@@ -2398,13 +2332,9 @@ L2:],
# ??? There exists an elf-specific test that will crash
# the assembler. Perhaps it's better to figure out whether
# arbitrary sections are supported and try the test.
- as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
- if echo "$as_ver" | grep GNU > /dev/null; then
- as_vers=`echo $as_ver | sed -n \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
- as_major=`expr "$as_vers" : '\([0-9]*\)'`
- as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
- if test $as_major -eq 2 && test $as_minor -lt 11
+ if test x$gcc_cv_gas_major_version != x; then
+ if test $gcc_cv_gas_major_version -eq 2 \
+ && test $gcc_cv_gas_minor_version -lt 11
then :
else gcc_cv_as_leb128=yes
fi