Use i?86, not i.86.

Don't test /usr/lib/ldscripts; instead, test whether ld_help_string
does not contain "supported emulations".
Use a case statement to distinguish systems when there IS
"supported emulations".
This commit is contained in:
rms 1997-06-10 02:49:33 +00:00
parent 362845a00a
commit 40f9286b0b

35
config.guess vendored
View File

@ -436,17 +436,21 @@ EOF
# The BFD linker knows what the default object file format is, so # The BFD linker knows what the default object file format is, so
# first see if it will tell us. # first see if it will tell us.
ld_help_string=`ld --help 2>&1` ld_help_string=`ld --help 2>&1`
if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then ld_supported_emulations=`echo $ld_help_string
echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 | sed -ne '/supported emulations:/!d
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then s/[ ][ ]*/ /g
echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 s/.*supported emulations: *//
elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations:sparclinux"; then s/ .*//
echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 p'`
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then case "$ld_supported_emulations" in
echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
echo "powerpc-unknown-linux-gnu" ; exit 0 sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elif test "${UNAME_MACHINE}" = "alpha" ; then m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
echo alpha-unknown-linux-gnu ; exit 0 echo alpha-unknown-linux-gnu ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then elif test "${UNAME_MACHINE}" = "mips" ; then
cat >dummy.c <<EOF cat >dummy.c <<EOF
@ -468,9 +472,12 @@ EOF
else else
# Either a pre-BFD a.out linker (linux-gnuoldld) # Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help. # or one that does not give us useful --help.
# Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout. # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
test ! -d /usr/lib/ldscripts/. \ # If ld does not provide *any* "supported emulations:"
&& echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 # that means it is gnuoldld.
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
case "${UNAME_MACHINE}" in case "${UNAME_MACHINE}" in
i?86) i?86)
VENDOR=pc; VENDOR=pc;