Subject: Re: amd automounter thinks wrong architecture?
To: None <current-users@netbsd.org>
From: Takeshi Nakayama <tn@catvmics.ne.jp>
List: current-users
Date: 08/10/2005 00:40:07
>>> Rui Paulo <rpaulo@NetBSD.org> wrote

> This is a bug in amd(8). cpu and arch are, wrongly, get from the build host
> (i.e., they come from the configure script), not the from the running
> host. endianess and karch come from the running machine, though.

How about an attached patch?

(Mmm, MACHINE and MACHINE_ARCH are swapped on netbsd-1-6 branch,
it's also need to fix.)

Index: mkconf
===================================================================
RCS file: /cvsroot/src/usr.sbin/amd/libamu/mkconf,v
retrieving revision 1.3
diff -u -d -r1.3 mkconf
--- mkconf	11 Jan 2004 18:37:35 -0000	1.3
+++ mkconf	9 Aug 2005 14:50:05 -0000
@@ -8,10 +8,10 @@
 /* Automatically generated file, do not edit! */
 
 /* Define name of host machine's architecture (eg. sun4) */
-#define HOST_ARCH "`uname -m`"
+#define HOST_ARCH MACHINE
 
 /* Define name of host machine's cpu (eg. sparc) */
-#define HOST_CPU "`uname -p`"
+#define HOST_CPU MACHINE_ARCH
  
 /* Define the header version of (linux) hosts (eg. 2.2.10) */
 #define HOST_HEADER_VERSION "$1"

-- Takeshi Nakayaama