diff --git a/ChangeLog b/ChangeLog index b4f8de8..628894f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-06-26 Ben Elliston + + * config.guess: On MIPS Linux, use /proc/cpuinfo to determine + the endian mode of the CPU, rather than compiling and running + a small C program. + 2001-06-12 John Wolfe * config.guess: Standardize triplet for UnixWare 7 and Open diff --git a/config.guess b/config.guess index 89fca6c..8ab34c4 100755 --- a/config.guess +++ b/config.guess @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. -timestamp='2001-06-12' +timestamp='2001-06-26' # 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 @@ -763,24 +763,10 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu 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 -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in + big) echo mips-unknown-linux-gnu && exit 0 ;; + little) echo mipsel-unknown-linux-gnu && exit 0 ;; + esac ;; ppc:Linux:*:*) # Determine Lib Version