From owner-cvs-all Fri Sep 14 3:23:37 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 435E237B40A; Fri, 14 Sep 2001 03:23:30 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA29671; Fri, 14 Sep 2001 20:23:06 +1000 Date: Fri, 14 Sep 2001 20:22:42 +1000 (EST) From: Bruce Evans X-X-Sender: To: Warner Losh Cc: Marcel Moolenaar , KATO Takenori , , , Subject: Re: hw.machine vs hw.machine_arch In-Reply-To: <200109140648.f8E6mFt19413@harmony.village.org> Message-ID: <20010914201048.W18027-100000@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 14 Sep 2001, Warner Losh wrote: > In message <20010913224828.B8717@dhcp01.pn.xcllnt.net> Marcel Moolenaar writes: > : I don't have a pc98 to check, but I don't see the evidence in the > : code that hw.machine=pc98 on pc98. Please check. > > These are both i386 on my pc98 machine, but I may have messed up when > building the kernel on my FreeBSD/i386 machine. It's certainly i386. UTSL :-) > : Also, given the above definition, what remains of the function of > : the hw.ispc98 MIB? > > machdep.ispc98 you mean? That is 0 on my FreeBSD/i386 boxes and 1 on > my pc98 machines. machdep.ispc98 is used mainly to give an unusual setting of ${MACHINE} for make(1). From make/main.c: #if defined(__i386__) && defined(__FreeBSD_version) && \ __FreeBSD_version > 300003 /* * PC-98 kernel sets the `i386' string to the utsname.machine and * it cannot be distinguished from IBM-PC by uname(3). Therefore, * we check machine.ispc98 and adjust the machine variable before * using usname(3) below. * NOTE: machdep.ispc98 was defined on 1998/8/31. At that time, * __FreeBSD_version was defined as 300003. So, this check can * safely be done with any kernel with version > 300003. */ if (!machine) { int ispc98; size_t len; len = sizeof(ispc98); if (!sysctlbyname("machdep.ispc98", &ispc98, &len, NULL, 0)) { if (ispc98) machine = "pc98"; } } #endif Note that this doesn't break cross-building. It is just for convenience, so that you don't have to remember to set MACHINE explitly when building pc98 userland with a pc98 kernel. But it is just confusing in other configurations. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message