From owner-freebsd-current Tue Jan 28 12: 8:32 2003 Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id B5D1E37B405; Tue, 28 Jan 2003 12:08:30 -0800 (PST) Date: Tue, 28 Jan 2003 12:08:30 -0800 From: Juli Mallett To: Takahashi Yoshihiro Cc: obrien@FreeBSD.ORG, current@FreeBSD.ORG, peter@FreeBSD.ORG, ru@FreeBSD.ORG Subject: Re: Patch to teach config(8) about "platforms". Message-ID: <20030128120830.A81856@FreeBSD.org> References: <20030125153116.A25743@FreeBSD.org> <20030128.233856.71130419.nyan@jp.FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030128.233856.71130419.nyan@jp.FreeBSD.org>; from nyan@jp.FreeBSD.org on Tue, Jan 28, 2003 at 11:38:56PM +0900 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-LiveJournal: flata, jmallett X-Negacore: Yes Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * De: Takahashi Yoshihiro [ Data: 2003-01-28 ] [ Subjecte: Re: Patch to teach config(8) about "platforms". ] > In article <20030125153116.A25743@FreeBSD.org> > Juli Mallett writes: > > > For example "platform sgimips" implies > > "options SGIMIPS". Below are patches to makefile glue and config(8) > > itself. > > I think that using '#ifdef ' (like #ifdef PC98) is not a good > idea. If it requires, the file should be splited into sys/. > I'll split some files in sys/i386 into sys/pc98. > > > > For clarity, this is used in cases where the platform may define its > > own values that a header needs, and as such, you might see something > > in like: > > #include > > How about next way? > > - Install sys/${MACHINE}/include into /usr/include/${MACHINE} > - Symlink /usr/include/machine -> /usr/include/${MACHINE} > - If ${MACHINE} != ${MACHINE_ARCH}, > install sys/${MACHINE_ARCH}/include into /usr/include/${MACHINE_ARCH} > > For example, sys/pc98/include/endian.h is '#include ' > only. This approach is a really bad one architecturally, in my opinion. It means there is a lot of duplication of what may all be VERY similar, and it means that if we had say 5 platforms supported by the MIPS port (certainly this is not a high number at all) that means there would be 5 directories under src/sys... And none of them would be "mips" since we wouldn't be supporting any hardware called "mips", that's just the general architecture. Or maybe we'd have "mips" and it would just be the first machine we ported to, and so that would be even more confusing for people trying to do a clean port to *just* support their architecture. They would have to know the other hardware very well also, not just the MIPS stuff, so they would know what to remove, what was something FreeBSD needed on MIPS, etc. I just really would like things to be clean, and abstracted, and not waste anyone's time. Why should we have to duplicate so much code? Thanx, juli. -- Juli Mallett AIM: BSDFlata -- IRC: juli on EFnet OpenDarwin, Mono, FreeBSD Developer ircd-hybrid Developer, EFnet addict FreeBSD on MIPS-Anything on FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message