* one down, a dozen to go.

2001-06-26  Ben Elliston  <bje@redhat.com>

	* 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.
This commit is contained in:
Ben Elliston 2001-06-26 11:14:13 +00:00
parent 6b5ef14654
commit 04f46f45a2
2 changed files with 11 additions and 19 deletions

View File

@ -1,3 +1,9 @@
2001-06-26 Ben Elliston <bje@redhat.com>
* 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 <jlw@sco.com>
* config.guess: Standardize triplet for UnixWare 7 and Open

24
config.guess vendored
View File

@ -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 <<EOF
#ifdef __cplusplus
#include <stdio.h> /* 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