diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2004-05-25 19:46:49 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2004-05-25 19:46:49 +0000 |
commit | 08d105faa5a0d6ce749e66f9485cace10ea3a375 (patch) | |
tree | da15d18ba1bd4611a7c431b2ffb0812fc12b0da0 /gcc/configure.ac | |
parent | 4fc4dd12a4709902916130fa0cb01209341bb0b4 (diff) | |
download | gcc-08d105faa5a0d6ce749e66f9485cace10ea3a375.zip gcc-08d105faa5a0d6ce749e66f9485cace10ea3a375.tar.gz gcc-08d105faa5a0d6ce749e66f9485cace10ea3a375.tar.bz2 |
configure.ac (gcc_cv_ld): Prefer in-tree ld over whatever the top-level detects...
* configure.ac (gcc_cv_ld): Prefer in-tree ld over whatever the
top-level detects, except when in-tree ld is being cross-built.
(gcc_cv_as): Likewise for as. Use AS_FOR_TARGET otherwise, and
then AS only if target is host.
* configure: Rebuilt.
From-SVN: r82258
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 45e5da5..b219c14 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1689,14 +1689,15 @@ gcc_cv_gas_minor_version= gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas if test -x "$DEFAULT_ASSEMBLER"; then gcc_cv_as="$DEFAULT_ASSEMBLER" -elif test -x "$AS"; then - gcc_cv_as="$AS" elif test -x as$host_exeext; then # Build using assembler in the current directory. gcc_cv_as=./as$host_exeext elif test -f $gcc_cv_as_gas_srcdir/configure.in \ - && test -f ../gas/Makefile; then - # Single tree build which includes gas. + && test -f ../gas/Makefile \ + && test x$build = x$host; 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. in_tree_gas=yes _gcc_COMPUTE_GAS_VERSION rm -f as$host_exeext @@ -1708,6 +1709,11 @@ elif test -f $gcc_cv_as_gas_srcdir/configure.in \ then in_tree_gas_is_elf=yes fi +m4_pattern_allow([AS_FOR_TARGET])dnl +elif test -x "$AS_FOR_TARGET"; then + gcc_cv_as="$AS_FOR_TARGET" +elif test -x "$AS" && test x$host = x$target; then + gcc_cv_as="$AS" fi if test "x$gcc_cv_as" = x; then @@ -1794,16 +1800,15 @@ gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd if test -x "$DEFAULT_LINKER"; then gcc_cv_ld="$DEFAULT_LINKER" -elif test -x "$LD_FOR_TARGET"; then - gcc_cv_ld="$LD_FOR_TARGET" -elif test -x "$LD" && test x$host = x$target; then - gcc_cv_ld="$LD" elif test -x collect-ld$host_exeext; then # Build using linker in the current directory. gcc_cv_ld=./collect-ld$host_exeext elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ - && test -f ../ld/Makefile; then - # Single tree build which includes ld. + && test -f ../ld/Makefile \ + && test x$build = x$host; then + # Single tree build which includes ld. We want to prefer it + # over whatever linker top-level may have detected, since + # we'll use what we're building after installation anyway. in_tree_ld=yes in_tree_ld_is_elf=no if (grep 'EMUL = .*elf' ../ld/Makefile \ @@ -1826,6 +1831,10 @@ changequote([,])dnl rm -f collect-ld$host_exeext $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ 2>/dev/null +elif test -x "$LD_FOR_TARGET"; then + gcc_cv_ld="$LD_FOR_TARGET" +elif test -x "$LD" && test x$host = x$target; then + gcc_cv_ld="$LD" fi if test "x$gcc_cv_ld" = x; then |