From owner-cvs-all Fri Sep 14 3:59:19 2001 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 655B137B405; Fri, 14 Sep 2001 03:58:27 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f8EAtfB14043; Fri, 14 Sep 2001 13:55:41 +0300 (EEST) (envelope-from ru) Date: Fri, 14 Sep 2001 13:55:41 +0300 From: Ruslan Ermilov To: Bruce Evans Cc: Warner Losh , Marcel Moolenaar , KATO Takenori , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: hw.machine vs hw.machine_arch Message-ID: <20010914135541.B12915@sunbay.com> References: <200109140648.f8E6mFt19413@harmony.village.org> <20010914201048.W18027-100000@delplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010914201048.W18027-100000@delplex.bde.org>; from bde@zeta.org.au on Fri, Sep 14, 2001 at 08:22:42PM +1000 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 Ahh, thank you very much! That explains why the requirement to set MACHINE=pc98 is missing in src/Makefile.inc1. I was in that piece of code recently, and didn't read the comment carefully. On Fri, Sep 14, 2001 at 08:22:42PM +1000, Bruce Evans wrote: > 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 -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message