Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Sep 2001 13:55:41 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Warner Losh <imp@harmony.village.org>, Marcel Moolenaar <marcel@xcllnt.net>, KATO Takenori <kato@nendai.nagoya-u.ac.jp>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: hw.machine vs hw.machine_arch
Message-ID:  <20010914135541.B12915@sunbay.com>
In-Reply-To: <20010914201048.W18027-100000@delplex.bde.org>; from bde@zeta.org.au on Fri, Sep 14, 2001 at 08:22:42PM %2B1000
References:  <200109140648.f8E6mFt19413@harmony.village.org> <20010914201048.W18027-100000@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010914135541.B12915>