* De: Takahashi Yoshihiro <[EMAIL PROTECTED]> [ Data: 2003-01-28 ]
        [ Subjecte: Re: Patch to teach config(8) about "platforms". ]
> In article <[EMAIL PROTECTED]>
> Juli Mallett <[EMAIL PROTECTED]> writes:
> 
> > For example "platform sgimips" implies
> > "options SGIMIPS".  Below are patches to makefile glue and config(8)
> > itself.
> 
> I think that using '#ifdef <machine>' (like #ifdef PC98) is not a good
> idea.  If it requires, the file should be splited into sys/<machine>.
> 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 <machine/endian.h> like:
> > #include <platform/endian.h>
> 
> 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 <i386/endian.h>'
> 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 <[EMAIL PROTECTED]>
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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to