From: "H . J . Lu" <hjl@lucon.org>
To: Ralf Baechle <ralf@oss.sgi.com>
Cc: linux-mips@oss.sgi.com, config-patches@gnu.org
Subject: PATCH: Handle Linux/mips (Re: Why is byteorder removed from /proc/cpuinfo?)
Date: Thu, 6 Dec 2001 10:36:05 -0800 [thread overview]
Message-ID: <20011206103605.A7366@lucon.org> (raw)
In-Reply-To: <20011206155724.A11083@dea.linux-mips.net>; from ralf@oss.sgi.com on Thu, Dec 06, 2001 at 03:57:24PM -0200
On Thu, Dec 06, 2001 at 03:57:24PM -0200, Ralf Baechle wrote:
> On Thu, Dec 06, 2001 at 09:35:06AM -0800, H . J . Lu wrote:
>
> > The byteorder field is emoved from /proc/cpuinfo in the current 2.4
> > kernel in CVS. It breaks config.guess used by all the GNU softwares.
>
> Grrr... In the past config.guess used gcc to compile a test program using
> gcc. I told sometime ago to whoever it was that I'm going to remove
> all non-cpu related information (endianess should be considered per
> _thread_ on MIPS!) from /proc/cpuinfo where it has no business; the /proc
> rewrite in 2.4.15 more or less forced me into this.
>
How about this patch?
H.J.
---
2001-12-06 H.J. Lu (hjl@gnu.org)
* config.guess: Properly handle Linux/mips.
--- config.guess.mips Mon Nov 5 08:09:32 2001
+++ config.guess Thu Dec 6 10:31:40 2001
@@ -767,10 +767,21 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
mips:Linux:*:*)
- 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
+ eval $set_cc_for_build
+ cat >$dummy.c <<EOF
+#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+cpu=mipsel
+#endif
+#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+cpu=mips
+#endif
+EOF
+ cpu=
+ eval `$CC_FOR_BUILD -E $dummy.c | grep cpu=`;
+ rm -f $dummy.c
+ if test -n "$cpu"; then
+ echo $cpu-unknown-linux-gnu && exit 0
+ fi
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
next prev parent reply other threads:[~2001-12-06 19:36 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-06 17:35 Why is byteorder removed from /proc/cpuinfo? H . J . Lu
2001-12-06 17:53 ` H . J . Lu
2001-12-06 17:57 ` Ralf Baechle
2001-12-06 18:36 ` H . J . Lu [this message]
2001-12-06 18:41 ` PATCH: Handle Linux/mips (Re: Why is byteorder removed from /proc/cpuinfo?) Ralf Baechle
2001-12-06 18:51 ` H . J . Lu
2001-12-06 19:16 ` Ralf Baechle
2001-12-10 7:23 ` Ben Elliston
2001-12-10 9:42 ` Ben Elliston
2001-12-10 14:21 ` Daniel Jacobowitz
2001-12-10 23:34 ` Ben Elliston
2001-12-10 23:34 ` Ben Elliston
2001-12-11 0:20 ` H . J . Lu
2001-12-11 0:23 ` Ben Elliston
2001-12-11 0:28 ` H . J . Lu
2001-12-10 18:28 ` Ralf Baechle
2001-12-10 20:24 ` Maciej W. Rozycki
2001-12-10 23:40 ` Ben Elliston
2001-12-10 23:40 ` Ben Elliston
2001-12-11 0:04 ` Maciej W. Rozycki
2001-12-11 13:30 ` Ralf Baechle
2001-12-11 23:11 ` Daniel Jacobowitz
2001-12-12 8:07 ` Ben Elliston
2001-12-10 18:40 ` Why is byteorder removed from /proc/cpuinfo? Dominic Sweetman
2001-12-10 19:06 ` Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011206103605.A7366@lucon.org \
--to=hjl@lucon.org \
--cc=config-patches@gnu.org \
--cc=linux-mips@oss.sgi.com \
--cc=ralf@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox