configure.in (gcc_cv_as): Use $target_alias in directory searchs rather than $target.

* configure.in (gcc_cv_as): Use $target_alias in directory searchs
	rather than $target.  Heed program_prefix and
	program_transform_name.  Search for gas in cross-compiler case too.
	"test -x" rather than "test -f".
	(gcc_cv_ld): Likewise.
	(gcc_cv_nm): Heed program_prefix and program_transform_name.
	(gcc_cv_objdump): Likewise.
	* configure: Regenerate.

From-SVN: r51489
This commit is contained in:
Alan Modra 2002-03-28 00:19:56 +00:00 committed by Alan Modra
parent 7ffb4fd2da
commit 55a2ea2a34
3 changed files with 126 additions and 75 deletions

View File

@ -1,3 +1,14 @@
2002-03-28 Alan Modra <amodra@bigpond.net.au>
* configure.in (gcc_cv_as): Use $target_alias in directory searchs
rather than $target. Heed program_prefix and
program_transform_name. Search for gas in cross-compiler case too.
"test -x" rather than "test -f".
(gcc_cv_ld): Likewise.
(gcc_cv_nm): Heed program_prefix and program_transform_name.
(gcc_cv_objdump): Likewise.
* configure: Regenerate.
2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
* Makefile.in (attribs.o): Update.

118
gcc/configure vendored
View File

@ -6870,8 +6870,7 @@ elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
fi
if test "x$gcc_cv_as" = x -a x$host = x$target; then
# Native build.
if test "x$gcc_cv_as" = x -a x$build = x$host; then
# Search the same directories that the installed compiler will
# search. Else we may find the wrong assembler and lose. If we
# do not find a suitable assembler binary, then try the user's
@ -6896,14 +6895,21 @@ if test "x$gcc_cv_as" = x -a x$host = x$target; then
# If the loop below does not find an assembler, then use whatever
# one we can find in the users's path.
# user's path.
gcc_cv_as=as$host_exeext
if test "x$program_prefix" != xNONE; then
gcc_cv_as=${program_prefix}as$host_exeext
else
gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
fi
test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
$test_prefix/lib/gcc-lib/$target \
/usr/lib/gcc/$target/$gcc_version \
/usr/lib/gcc/$target \
$test_prefix/$target/bin/$target/$gcc_version \
$test_prefix/$target/bin \
test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
$test_prefix/lib/gcc-lib/$target_alias \
/usr/lib/gcc/$target_alias/$gcc_version \
/usr/lib/gcc/$target_alias \
$test_prefix/$target_alias/bin/$target_alias/$gcc_version \
$test_prefix/$target_alias/bin"
if test x$host = x$target; then
test_dirs="$test_dirs \
/usr/libexec \
/usr/ccs/gcc \
/usr/ccs/bin \
@ -6914,9 +6920,10 @@ if test "x$gcc_cv_as" = x -a x$host = x$target; then
/sysv/usr/lib/cmplrs/cc \
/svr4/usr/lib/cmplrs/cc \
/usr/bin"
fi
for dir in $test_dirs; do
if test -f $dir/as$host_exeext; then
if test -x $dir/as$host_exeext; then
gcc_cv_as=$dir/as$host_exeext
break;
fi
@ -6930,7 +6937,7 @@ fi
# Figure out what linker we will be using.
echo $ac_n "checking what linker to use""... $ac_c" 1>&6
echo "configure:6934: checking what linker to use" >&5
echo "configure:6941: checking what linker to use" >&5
gcc_cv_ld=
gcc_cv_gld_major_version=
gcc_cv_gld_minor_version=
@ -6956,8 +6963,7 @@ elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then
gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
fi
if test "x$gcc_cv_ld" = x -a x$host = x$target; then
# Native build.
if test "x$gcc_cv_ld" = x -a x$build = x$host; then
# Search the same directories that the installed compiler will
# search. Else we may find the wrong linker and lose. If we
# do not find a suitable linker binary, then try the user's
@ -6982,14 +6988,21 @@ if test "x$gcc_cv_ld" = x -a x$host = x$target; then
# If the loop below does not find an linker, then use whatever
# one we can find in the users's path.
# user's path.
gcc_cv_ld=ld$host_exeext
if test "x$program_prefix" != xNONE; then
gcc_cv_ld=${program_prefix}ld$host_exeext
else
gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
fi
test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
$test_prefix/lib/gcc-lib/$target \
/usr/lib/gcc/$target/$gcc_version \
/usr/lib/gcc/$target \
$test_prefix/$target/bin/$target/$gcc_version \
$test_prefix/$target/bin \
test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
$test_prefix/lib/gcc-lib/$target_alias \
/usr/lib/gcc/$target_alias/$gcc_version \
/usr/lib/gcc/$target_alias \
$test_prefix/$target_alias/bin/$target_alias/$gcc_version \
$test_prefix/$target_alias/bin"
if test x$host = x$target; then
test_dirs="$test_dirs \
/usr/libexec \
/usr/ccs/gcc \
/usr/ccs/bin \
@ -7000,9 +7013,10 @@ if test "x$gcc_cv_ld" = x -a x$host = x$target; then
/sysv/usr/lib/cmplrs/cc \
/svr4/usr/lib/cmplrs/cc \
/usr/bin"
fi
for dir in $test_dirs; do
if test -f $dir/ld$host_exeext; then
if test -x $dir/ld$host_exeext; then
gcc_cv_ld=$dir/ld$host_exeext
break;
fi
@ -7016,29 +7030,35 @@ fi
# Figure out what nm we will be using.
echo $ac_n "checking what nm to use""... $ac_c" 1>&6
echo "configure:7020: checking what nm to use" >&5
echo "configure:7034: checking what nm to use" >&5
if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext
elif test x$host = x$target; then
# Native build.
gcc_cv_nm=nm$host_exeext
elif test x$build = x$host; then
if test "x$program_prefix" != xNONE; then
gcc_cv_nm=${program_prefix}nm$host_exeext
else
gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
fi
fi
echo "$ac_t""$gcc_cv_nm" 1>&6
# Figure out what objdump we will be using.
echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
echo "configure:7031: checking what objdump to use" >&5
echo "configure:7048: checking what objdump to use" >&5
if test -x objdump$host_exeext; then
gcc_cv_objdump=./objdump$host_exeext
elif test x$host = x$target; then
# Native build.
gcc_cv_objdump=objdump$host_exeext
elif test x$build = x$host; then
if test "x$program_prefix" != xNONE; then
gcc_cv_objdump=${program_prefix}objdump$host_exeext
else
gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
fi
fi
echo "$ac_t""$gcc_cv_objdump" 1>&6
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
echo "configure:7042: checking assembler alignment features" >&5
echo "configure:7062: checking assembler alignment features" >&5
gcc_cv_as_alignment_features=none
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
# Gas version 2.6 and later support for .balign and .p2align.
@ -7086,7 +7106,7 @@ fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
echo "configure:7090: checking assembler subsection support" >&5
echo "configure:7110: checking assembler subsection support" >&5
gcc_cv_as_subsections=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7126,7 +7146,7 @@ fi
echo "$ac_t""$gcc_cv_as_subsections" 1>&6
echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
echo "configure:7130: checking assembler weak support" >&5
echo "configure:7150: checking assembler weak support" >&5
gcc_cv_as_weak=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
@ -7149,7 +7169,7 @@ fi
echo "$ac_t""$gcc_cv_as_weak" 1>&6
echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
echo "configure:7153: checking assembler hidden support" >&5
echo "configure:7173: checking assembler hidden support" >&5
gcc_cv_as_hidden=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7175,7 +7195,7 @@ libgcc_visibility=$gcc_cv_as_hidden
echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
echo "configure:7179: checking assembler leb128 support" >&5
echo "configure:7199: checking assembler leb128 support" >&5
gcc_cv_as_leb128=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7220,7 +7240,7 @@ fi
echo "$ac_t""$gcc_cv_as_leb128" 1>&6
echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
echo "configure:7224: checking assembler eh_frame optimization" >&5
echo "configure:7244: checking assembler eh_frame optimization" >&5
gcc_cv_as_eh_frame=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7301,7 +7321,7 @@ fi
echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
echo "configure:7305: checking assembler section merging support" >&5
echo "configure:7325: checking assembler section merging support" >&5
gcc_cv_as_shf_merge=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7327,7 +7347,7 @@ case "$target" in
# All TARGET_ABI_OSF targets.
alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
echo "configure:7331: checking assembler supports explicit relocations" >&5
echo "configure:7351: checking assembler supports explicit relocations" >&5
if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7377,7 +7397,7 @@ EOF
;;
sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
echo "configure:7381: checking assembler .register pseudo-op support" >&5
echo "configure:7401: checking assembler .register pseudo-op support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7405,7 +7425,7 @@ EOF
fi
echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
echo "configure:7409: checking assembler supports -relax" >&5
echo "configure:7429: checking assembler supports -relax" >&5
if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7433,7 +7453,7 @@ EOF
fi
echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
echo "configure:7437: checking assembler and linker support unaligned pc related relocs" >&5
echo "configure:7457: checking assembler and linker support unaligned pc related relocs" >&5
if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7463,7 +7483,7 @@ EOF
case "$tm_file" in
*64*)
echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
echo "configure:7467: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
echo "configure:7487: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7508,7 +7528,7 @@ EOF
if test "x$gcc_cv_as_flags64" != xno; then
echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
echo "configure:7512: checking for assembler offsetable %lo() support" >&5
echo "configure:7532: checking for assembler offsetable %lo() support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7548,7 +7568,7 @@ EOF
i[34567]86-*-* | x86_64-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
echo "configure:7552: checking assembler instructions" >&5
echo "configure:7572: checking assembler instructions" >&5
gcc_cv_as_instructions=
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then
@ -7575,7 +7595,7 @@ EOF
echo "$ac_t""$gcc_cv_as_instructions" 1>&6
echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
echo "configure:7579: checking assembler GOTOFF in data directives" >&5
echo "configure:7599: checking assembler GOTOFF in data directives" >&5
gcc_cv_as_gotoff_in_data=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
then
@ -7605,7 +7625,7 @@ EOF
esac
echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
echo "configure:7609: checking assembler dwarf2 debug_line support" >&5
echo "configure:7629: checking assembler dwarf2 debug_line support" >&5
gcc_cv_as_dwarf2_debug_line=no
# ??? Not all targets support dwarf2 debug_line, even within a version
# of gas. Moreover, we need to emit a valid instruction to trigger any
@ -7661,7 +7681,7 @@ fi
echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
echo "configure:7665: checking assembler --gdwarf2 support" >&5
echo "configure:7685: checking assembler --gdwarf2 support" >&5
gcc_cv_as_gdwarf2_flag=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
then
@ -7690,7 +7710,7 @@ fi
echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
echo "configure:7694: checking assembler --gstabs support" >&5
echo "configure:7714: checking assembler --gstabs support" >&5
gcc_cv_as_gstabs_flag=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
then
@ -7718,7 +7738,7 @@ fi
echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
echo "configure:7722: checking linker PT_GNU_EH_FRAME support" >&5
echo "configure:7742: checking linker PT_GNU_EH_FRAME support" >&5
gcc_cv_ld_eh_frame_hdr=no
if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
@ -7881,7 +7901,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:7885: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo "configure:7905: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"

View File

@ -1222,8 +1222,7 @@ changequote(,)dnl
changequote([,])dnl
fi
if test "x$gcc_cv_as" = x -a x$host = x$target; then
# Native build.
if test "x$gcc_cv_as" = x -a x$build = x$host; then
# Search the same directories that the installed compiler will
# search. Else we may find the wrong assembler and lose. If we
# do not find a suitable assembler binary, then try the user's
@ -1248,14 +1247,21 @@ if test "x$gcc_cv_as" = x -a x$host = x$target; then
# If the loop below does not find an assembler, then use whatever
# one we can find in the users's path.
# user's path.
gcc_cv_as=as$host_exeext
if test "x$program_prefix" != xNONE; then
gcc_cv_as=${program_prefix}as$host_exeext
else
gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
fi
test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
$test_prefix/lib/gcc-lib/$target \
/usr/lib/gcc/$target/$gcc_version \
/usr/lib/gcc/$target \
$test_prefix/$target/bin/$target/$gcc_version \
$test_prefix/$target/bin \
test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
$test_prefix/lib/gcc-lib/$target_alias \
/usr/lib/gcc/$target_alias/$gcc_version \
/usr/lib/gcc/$target_alias \
$test_prefix/$target_alias/bin/$target_alias/$gcc_version \
$test_prefix/$target_alias/bin"
if test x$host = x$target; then
test_dirs="$test_dirs \
/usr/libexec \
/usr/ccs/gcc \
/usr/ccs/bin \
@ -1266,9 +1272,10 @@ if test "x$gcc_cv_as" = x -a x$host = x$target; then
/sysv/usr/lib/cmplrs/cc \
/svr4/usr/lib/cmplrs/cc \
/usr/bin"
fi
for dir in $test_dirs; do
if test -f $dir/as$host_exeext; then
if test -x $dir/as$host_exeext; then
gcc_cv_as=$dir/as$host_exeext
break;
fi
@ -1311,8 +1318,7 @@ changequote(,)dnl
changequote([,])dnl
fi
if test "x$gcc_cv_ld" = x -a x$host = x$target; then
# Native build.
if test "x$gcc_cv_ld" = x -a x$build = x$host; then
# Search the same directories that the installed compiler will
# search. Else we may find the wrong linker and lose. If we
# do not find a suitable linker binary, then try the user's
@ -1337,14 +1343,21 @@ if test "x$gcc_cv_ld" = x -a x$host = x$target; then
# If the loop below does not find an linker, then use whatever
# one we can find in the users's path.
# user's path.
gcc_cv_ld=ld$host_exeext
if test "x$program_prefix" != xNONE; then
gcc_cv_ld=${program_prefix}ld$host_exeext
else
gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
fi
test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
$test_prefix/lib/gcc-lib/$target \
/usr/lib/gcc/$target/$gcc_version \
/usr/lib/gcc/$target \
$test_prefix/$target/bin/$target/$gcc_version \
$test_prefix/$target/bin \
test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
$test_prefix/lib/gcc-lib/$target_alias \
/usr/lib/gcc/$target_alias/$gcc_version \
/usr/lib/gcc/$target_alias \
$test_prefix/$target_alias/bin/$target_alias/$gcc_version \
$test_prefix/$target_alias/bin"
if test x$host = x$target; then
test_dirs="$test_dirs \
/usr/libexec \
/usr/ccs/gcc \
/usr/ccs/bin \
@ -1355,9 +1368,10 @@ if test "x$gcc_cv_ld" = x -a x$host = x$target; then
/sysv/usr/lib/cmplrs/cc \
/svr4/usr/lib/cmplrs/cc \
/usr/bin"
fi
for dir in $test_dirs; do
if test -f $dir/ld$host_exeext; then
if test -x $dir/ld$host_exeext; then
gcc_cv_ld=$dir/ld$host_exeext
break;
fi
@ -1373,9 +1387,12 @@ fi
AC_MSG_CHECKING(what nm to use)
if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext
elif test x$host = x$target; then
# Native build.
gcc_cv_nm=nm$host_exeext
elif test x$build = x$host; then
if test "x$program_prefix" != xNONE; then
gcc_cv_nm=${program_prefix}nm$host_exeext
else
gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
fi
fi
AC_MSG_RESULT($gcc_cv_nm)
@ -1383,9 +1400,12 @@ AC_MSG_RESULT($gcc_cv_nm)
AC_MSG_CHECKING(what objdump to use)
if test -x objdump$host_exeext; then
gcc_cv_objdump=./objdump$host_exeext
elif test x$host = x$target; then
# Native build.
gcc_cv_objdump=objdump$host_exeext
elif test x$build = x$host; then
if test "x$program_prefix" != xNONE; then
gcc_cv_objdump=${program_prefix}objdump$host_exeext
else
gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
fi
fi
AC_MSG_RESULT($gcc_cv_objdump)