2001-02-23 Ben Elliston <bje@redhat.com>

* config.guess: More Linux cleanup. Match more in the top-level
	case statement and less by groking the output of ld.
This commit is contained in:
Ben Elliston 2001-02-22 22:30:36 +00:00
parent d45bc28498
commit 0c8270cf72
2 changed files with 115 additions and 130 deletions

View File

@ -1,3 +1,8 @@
2001-02-23 Ben Elliston <bje@redhat.com>
* config.guess: More Linux cleanup. Match more in the top-level
case statement and less by groking the output of ld.
2001-02-16 Ben Elliston <bje@redhat.com> 2001-02-16 Ben Elliston <bje@redhat.com>
* config.sub: Recognise [cjt]90-*. From Kevin Ryde. * config.sub: Recognise [cjt]90-*. From Kevin Ryde.
@ -17,7 +22,7 @@
2001-02-13 Ben Elliston <bje@redhat.com> 2001-02-13 Ben Elliston <bje@redhat.com>
* config.guess: More Linux clean-up. * config.guess: More Linux cleanup.
2001-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com> 2001-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>

142
config.guess vendored
View File

@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
timestamp='2001-02-13' timestamp='2001-02-23'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -750,11 +750,14 @@ EOF
i*86:Minix:*:*) i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix echo ${UNAME_MACHINE}-pc-minix
exit 0 ;; exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
ia64:Linux:*:*) ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux echo ${UNAME_MACHINE}-unknown-linux
exit 0 ;; exit 0 ;;
s390:Linux:*:* | s390x:Linux:*:*) m68*:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux echo ${UNAME_MACHINE}-unknown-linux-gnuaout
exit 0 ;; exit 0 ;;
mips:Linux:*:*) mips:Linux:*:*)
cat >$dummy.c <<EOF cat >$dummy.c <<EOF
@ -776,70 +779,7 @@ EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 $CC_FOR_BUILD $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
;; ;;
x86_64:Linux:*:*) ppc:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit 0 ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-gnu ;;
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
esac
exit 0 ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
*:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
ld_supported_emulations=`cd /; ld --help 2>&1 \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
s/.*supported emulations: *//
s/ .*//
p'`
case "$ld_supported_emulations" in
i?86linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0
;;
elf_i?86)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
i?86coff)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0
;;
sparclinux)
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
exit 0
;;
elf32_sparc)
echo "${UNAME_MACHINE}-unknown-linux-gnu"
exit 0
;;
armlinux)
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
exit 0
;;
elf32arm*)
echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
exit 0
;;
armelf_linux*)
echo "${UNAME_MACHINE}-unknown-linux-gnu"
exit 0
;;
m68klinux)
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
exit 0
;;
elf32ppc | elf32ppclinux)
# Determine Lib Version # Determine Lib Version
cat >$dummy.c <<EOF cat >$dummy.c <<EOF
#include <features.h> #include <features.h>
@ -854,7 +794,7 @@ main(argc, argv)
#if defined(__GLIBC__) #if defined(__GLIBC__)
printf("%s %s\n", __libc_version, __libc_release); printf("%s %s\n", __libc_version, __libc_release);
#else #else
printf("unkown\n"); printf("unknown\n");
#endif #endif
return 0; return 0;
} }
@ -863,22 +803,16 @@ EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
if test "$?" = 0 ; then if test "$?" = 0 ; then
./$dummy | grep 1\.99 > /dev/null ./$dummy | grep 1\.99 > /dev/null
if test "$?" = 0 ; then if test "$?" = 0 ; then LIBC="libc1" ; fi
LIBC="libc1"
fi
fi fi
rm -f $dummy.c $dummy rm -f $dummy.c $dummy
echo powerpc-unknown-linux-gnu${LIBC} echo powerpc-unknown-linux-gnu${LIBC}
exit 0 exit 0 ;;
;; alpha:Linux:*:*)
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
cat <<EOF >$dummy.s cat <<EOF >$dummy.s
.data .data
\$Lformat: \$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n" .byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text .text
.globl main .globl main
.align 4 .align 4
@ -910,7 +844,6 @@ EOF
2-303) UNAME_MACHINE="alphaev6" ;; 2-303) UNAME_MACHINE="alphaev6" ;;
2-307) UNAME_MACHINE="alphaev67" ;; 2-307) UNAME_MACHINE="alphaev67" ;;
esac esac
objdump --private-headers $dummy | \ objdump --private-headers $dummy | \
grep ld.so.1 > /dev/null grep ld.so.1 > /dev/null
if test "$?" = 0 ; then if test "$?" = 0 ; then
@ -918,8 +851,55 @@ EOF
fi fi
fi fi
rm -f $dummy.s $dummy rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
else exit 0 ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-gnu ;;
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
esac
exit 0 ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
exit 0 ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
sparc:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit 0 ;;
*:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
ld_supported_emulations=`cd /; ld --help 2>&1 \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
s/.*supported emulations: *//
s/ .*//
p'`
case "$ld_supported_emulations" in
i?86linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0
;;
elf_i?86)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
i?86coff)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0
;;
esac
# 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.
@ -964,7 +944,7 @@ EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 $CC_FOR_BUILD $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
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
fi ;; ;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename. # are messed up and put the nodename in both sysname and nodename.
i?86:DYNIX/ptx:4*:*) i?86:DYNIX/ptx:4*:*)