From c44a518654ecd3486c0c155d56896654e9340df9 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Tue, 13 Feb 2001 01:42:35 +0000 Subject: [PATCH] 2001-02-13 Ben Elliston * config.guess: More Linux clean-up. --- ChangeLog | 6 +++- config.guess | 78 +++++++++++++++++++++------------------------------- 2 files changed, 37 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c9f6a8..d66596e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -2001-02-09 Martin Schwidefsky +2001-02-13 Ben Elliston + + * config.guess: More Linux clean-up. + +2001-02-13 Martin Schwidefsky * config.guess: Add Linux target for S/390x. * config.sub: Likewise. diff --git a/config.guess b/config.guess index b1dbf32..cc71cf3 100755 --- a/config.guess +++ b/config.guess @@ -755,9 +755,32 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; + mips:Linux:*:*) + cat >$dummy.c < /* for printf() prototype */ +int main (int argc, char *argv[]) { +#else +int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __MIPSEB__ + printf ("%s-unknown-linux-gnu\n", argv[1]); +#endif +#ifdef __MIPSEL__ + printf ("%sel-unknown-linux-gnu\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; @@ -772,7 +795,9 @@ EOF 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 @@ -784,10 +809,6 @@ EOF s/ .*// p'` case "$ld_supported_emulations" in - *ia64) - echo "${UNAME_MACHINE}-unknown-linux" - exit 0 - ;; i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 @@ -855,10 +876,6 @@ EOF echo powerpc-unknown-linux-gnu${LIBC} exit 0 ;; - shelf_linux) - echo "${UNAME_MACHINE}-unknown-linux-gnu" - exit 0 - ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then @@ -891,24 +908,12 @@ EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; + 0-0) UNAME_MACHINE="alpha" ;; + 1-0) UNAME_MACHINE="alphaev5" ;; + 1-1) UNAME_MACHINE="alphaev56" ;; + 1-101) UNAME_MACHINE="alphapca56" ;; + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) UNAME_MACHINE="alphaev67" ;; esac objdump --private-headers $dummy | \ @@ -919,25 +924,6 @@ EOF fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >$dummy.c < /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __MIPSEB__ - printf ("%s-unknown-linux-gnu\n", argv[1]); -#endif -#ifdef __MIPSEL__ - printf ("%sel-unknown-linux-gnu\n", argv[1]); -#endif - return 0; -} -EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy else # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help.