Commit 55a2ea2a by Alan Modra Committed by Alan Modra

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
parent 7ffb4fd2
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.
......
......@@ -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
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 \
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_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
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 \
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_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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment