From 779243f72027453fbf0638f281f86a632096b57a Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Mon, 31 May 1999 02:22:12 +0000 Subject: [PATCH] configure.in (native gas tests): Search for an assembler in the same manner that the installed compiler will. * configure.in (native gas tests): Search for an assembler in the same manner that the installed compiler will. * configure: Rebuilt. From-SVN: r27269 --- gcc/ChangeLog | 4 ++++ gcc/configure | 54 +++++++++++++++++++++++++++++++++++++++++++++--- gcc/configure.in | 50 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 104 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 20ad9b64d37..1215de2b633 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ Mon May 31 00:46:17 1999 Jeffrey A Law (law@cygnus.com) + * configure.in (native gas tests): Search for an assembler in the + same manner that the installed compiler will. + * configure: Rebuilt. + * alias.c (find_base_term): Improve handling of addresses constructed from binary operations. diff --git a/gcc/configure b/gcc/configure index 4571948aeb8..e64fe6c0eb5 100755 --- a/gcc/configure +++ b/gcc/configure @@ -8087,7 +8087,55 @@ EOF fi elif test x$host = x$target; then # Native build. - gcc_cv_as=as$host_exeext + # 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 + # path. + # + # Also note we have to check MD_EXEC_PREFIX before checking the + # user's path. Unfortunately, there is no good way to get at the + # value of MD_EXEC_PREFIX here. So we do a brute force search + # through all the known MD_EXEC_PREFIX values. Ugh. This needs + # to be fixed as part of the make/configure rewrite too. + + if test "x$exec_prefix" = xNONE; then + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + else + test_prefix=$exec_prefix + fi + + # If the loop below does not find an assembler, then use whatever + # one we can find in the users's path. + # user's path. + 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 \ + /usr/libexec \ + /usr/ccs/gcc \ + /usr/ccs/bin \ + /udk/usr/ccs/bin \ + /bsd43/usr/lib/cmplrs/cc \ + /usr/cross64/usr/bin \ + /usr/lib/cmplrs/cc \ + /sysv/usr/lib/cmplrs/cc \ + /svr4/usr/lib/cmplrs/cc \ + /usr/bin" + + for dir in $test_dirs; do + if test -f $dir/as$host_exeext; then + gcc_cv_as=$dir/as$host_exeext + break; + fi + done fi if test x$gcc_cv_as != x; then # Check if we have .balign and .p2align @@ -8116,7 +8164,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:8120: checking assembler subsection support" >&5 +echo "configure:8168: checking assembler subsection support" >&5 gcc_cv_as_subsections= if test x$gcc_cv_as != x; then # Check if we have .subsection @@ -8156,7 +8204,7 @@ fi echo "$ac_t""$gcc_cv_as_subsections" 1>&6 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 -echo "configure:8160: checking assembler instructions" >&5 +echo "configure:8208: checking assembler instructions" >&5 gcc_cv_as_instructions= if test x$gcc_cv_as != x; then set "filds fists" "filds mem; fists mem" diff --git a/gcc/configure.in b/gcc/configure.in index 3547d0bd243..31084305058 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -3934,7 +3934,55 @@ changequote([,])dnl fi elif test x$host = x$target; then # Native build. - gcc_cv_as=as$host_exeext + # 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 + # path. + # + # Also note we have to check MD_EXEC_PREFIX before checking the + # user's path. Unfortunately, there is no good way to get at the + # value of MD_EXEC_PREFIX here. So we do a brute force search + # through all the known MD_EXEC_PREFIX values. Ugh. This needs + # to be fixed as part of the make/configure rewrite too. + + if test "x$exec_prefix" = xNONE; then + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + else + test_prefix=$exec_prefix + fi + + # If the loop below does not find an assembler, then use whatever + # one we can find in the users's path. + # user's path. + 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 \ + /usr/libexec \ + /usr/ccs/gcc \ + /usr/ccs/bin \ + /udk/usr/ccs/bin \ + /bsd43/usr/lib/cmplrs/cc \ + /usr/cross64/usr/bin \ + /usr/lib/cmplrs/cc \ + /sysv/usr/lib/cmplrs/cc \ + /svr4/usr/lib/cmplrs/cc \ + /usr/bin" + + for dir in $test_dirs; do + if test -f $dir/as$host_exeext; then + gcc_cv_as=$dir/as$host_exeext + break; + fi + done fi if test x$gcc_cv_as != x; then # Check if we have .balign and .p2align -- 2.30.2