Subject: Re: building tools fails
To: None <current-users@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: current-users
Date: 06/06/2004 02:03:26
In article <20040605125247.A5507@noc.untraceable.net>
atatat@atatdot.net wrote:

> if you can do that, that will work fine.  alternately, borrowing a
> sysctl binary and libc from ~2.0E should work, too.

Or we should try `uname -p` first before sysctl?

Index: config.guess
===================================================================
RCS file: /cvsroot/src/gnu/dist/gcc/config.guess,v
retrieving revision 1.3
diff -u -r1.3 config.guess
--- config.guess	25 Jul 2003 09:04:14 -0000	1.3
+++ config.guess	5 Jun 2004 16:58:27 -0000
@@ -150,7 +150,8 @@
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	UNAME_MACHINE_ARCH=`(uname -p 2> /dev/null || \
+	    /sbin/$sysctl 2>/dev/null || \
 	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
 	case "${UNAME_MACHINE_ARCH}" in
 	    armeb) machine=armeb-unknown ;;

---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp