Re: config & endianness

Quentin Garnier <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel,gmane.os.netbsd.ports.evbmips
Message-ID <[email protected]>
On Mon, Mar 06, 2006 at 09:36:08AM -0800, Garrett D'Amore wrote:
> 
> Izumi Tsutsui wrote:
> > In article <[email protected]>
> > [email protected] wrote:
> >
> >   
> >> Is there a way to establish stuff in config so that:
> >>
> >>     1) an attempt to build a kernel with endianness that doesn't make
> >> sense fails in config(8), AND
> >>     
> >
> > config(1) doesn't care ${MACHINE_ARCH} at all, and
> > AFAIK the binary format is determined by your toolchain
> > though improper toolchain might cause build errors.
> >
> > We could add some assertion in the board specific source files,
> > but I don't know if there is some similar way for config(1) to
> > generate such assertions.
> >   
> Maybe in the Makefiles?   I didn't realize that config doesn't know
> about this.  I use build.sh myself.

And build.sh uses config, of course.  That doesn't mean config(1) must
not know about this.  As a part of the toolchain, I don't see any
compelling reason not to allow it to know about the arch it is supposed
to work for.  I'd simply use a flag for that;  people running config(1)
directly (even if it is a "cross-compile" version, i.e. the result of
build.sh tools) usually know enough about what they do.

> >>     2) the master releng Makefiles/scripts only bother to build the
> >> kernels that make sense for a particular endianness
> >>     
> >
> > For release kernel sets, maybe you could add
> > .if ${MACHINE_ARCH} == "mipsel" (or something)
> > in etc/etc.evbmips/Makefile.inc?
> >   
> That sounds like very helpful advice.  I'll look into it.  Thank-you.

And this is the best anyway.  Making config(1) bail as part of the
normal build process doesn't sound too good :-)  But driving away users
from building inoperable kernels is probably useful.

I don't seem to be not using many double-negations.

-- 
Quentin Garnier - [email protected] - [email protected]
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.
signature.asc (application/pgp-signature, 478 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBRAx3hNgoQloHrPnoAQL88gf+LV3RQKrQBaw0yZs7gBSHURfQPSLKNh4c
LMpri/Ik90rJn1z7QuEJqo/MA7JIYPFIQSy6rXSK/1aUCKgCYIwwaIQimRr/8NU/
BL+7s7EDjvHTE+WspAYQ0ngq8HEweV2ta7odKrIPnUvUcrBQOVhRufsLsKCEUJDn
CTAHpcq8n9cToBg1JvsU7MD6exHh2vvbzyRds41QcLuJ+mfYeRKv7K6UGX+gjXip
DMSshEMIjqHTPaH2B0V1y9pO0Dlripy5YOy6sEPhX9Jt1UBQiEmeE8FKRQzSLcS7
LVZRq64XSmbvcjguGRSzAf6J4+tpUuRFHtQ23CknIHVOROyVWDbHOQ==
=T0PT
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.