mirror of
git://git.savannah.gnu.org/config.git
synced 2025-05-29 02:26:36 +12:00
(*:Linux:*:*): Recognize sparclinux.
Don't recognize UNAME_MACHINE = sparc. Make the sample program check for libc version and handle various machine types.
This commit is contained in:
parent
08e49f320f
commit
f9c81c829d
36
config.guess
vendored
36
config.guess
vendored
@ -442,6 +442,8 @@ EOF
|
|||||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
|
echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
|
||||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
|
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
|
||||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
|
echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
|
||||||
|
elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations:sparclinux"; then
|
||||||
|
echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
|
||||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
|
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
|
||||||
echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
|
echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
|
||||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
|
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
|
||||||
@ -450,13 +452,11 @@ EOF
|
|||||||
echo "powerpc-unknown-linux-gnu" ; exit 0
|
echo "powerpc-unknown-linux-gnu" ; exit 0
|
||||||
elif test "${UNAME_MACHINE}" = "alpha" ; then
|
elif test "${UNAME_MACHINE}" = "alpha" ; then
|
||||||
echo alpha-unknown-linux-gnu ; exit 0
|
echo alpha-unknown-linux-gnu ; exit 0
|
||||||
elif test "${UNAME_MACHINE}" = "sparc" ; then
|
|
||||||
echo sparc-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
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char *argv[];
|
char *argv[];
|
||||||
{
|
{
|
||||||
#ifdef __MIPSEB__
|
#ifdef __MIPSEB__
|
||||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||||
@ -470,18 +470,36 @@ EOF
|
|||||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||||
rm -f dummy.c dummy
|
rm -f dummy.c dummy
|
||||||
else
|
else
|
||||||
# Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
|
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||||
# useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
# or one that does not give us useful --help.
|
||||||
|
# Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
||||||
test ! -d /usr/lib/ldscripts/. \
|
test ! -d /usr/lib/ldscripts/. \
|
||||||
&& echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
&& echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||||
|
case "${UNAME_MACHINE}" in
|
||||||
|
i.86)
|
||||||
|
VENDOR=pc;
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
VENDOR=unknown;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
# Determine whether the default compiler is a.out or elf
|
# Determine whether the default compiler is a.out or elf
|
||||||
cat >dummy.c <<EOF
|
cat >dummy.c <<EOF
|
||||||
|
#include <features.h>
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char *argv[];
|
char *argv[];
|
||||||
{
|
{
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
printf ("%s-pc-linux-gnu\n", argv[1]);
|
# ifdef __GLIBC__
|
||||||
|
# if __GLIBC__ >= 2
|
||||||
|
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
|
||||||
|
# else
|
||||||
|
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
printf ("%s-pc-linux-gnuaout\n", argv[1]);
|
printf ("%s-pc-linux-gnuaout\n", argv[1]);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user