aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-05-31 02:22:12 +0000
committerJeff Law <law@gcc.gnu.org>1999-05-30 20:22:12 -0600
commit779243f72027453fbf0638f281f86a632096b57a (patch)
treef4d0a1ac9993779999d0040eb7ba5d68e903dc55 /gcc
parentf4d9222d03f8f075dab30245fa31b0f588cb3132 (diff)
downloadgcc-779243f72027453fbf0638f281f86a632096b57a.zip
gcc-779243f72027453fbf0638f281f86a632096b57a.tar.gz
gcc-779243f72027453fbf0638f281f86a632096b57a.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rwxr-xr-xgcc/configure54
-rw-r--r--gcc/configure.in50
3 files changed, 104 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 20ad9b6..1215de2 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 4571948..e64fe6c 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 3547d0b..3108430 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