Subject: Re: cross compiling -cuurent on 1.4/alpha
To: None <email@example.com>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 12/28/1999 13:35:23
[ On Sunday, December 26, 1999 at 13:28:01 (-0800), Bill Studenmund wrote: ]
> Subject: Re: cross compiling -cuurent on 1.4/alpha
> When DESTDIR is set, make build does not use /usr/include for the new
> binaries(*). Which is cool as you can build a whole new world (including
> tar balls) without touching your installed tree. You have to have
> relatively recent tools (like make & friends), but they can (usually) be
> built against the old headers & libraries.
So, why not go fully to the model FreeBSD uses and build all of the
development tools and install them in $DESTDIR, and then chdir($DESTDIR)
to do the full build (including re-building the build tools with just
themselves, but of course in a cross-build kind of way)?
I think the FreeBSD process currently require superuser to effect this,
but I think a relatively safe chdir() wrapper could be implemented to
avoid this rather uncomfortable need to do builds as superuser, provided
of course that some other facilities were also introduced, such as an
"mtree" run as root at the right time fix up everything in $DESTDIR.
Ultimately the FreeBSD model is extremely enticing because it allows
anyone with sufficient disk space to build *all* of the products,
including all the kernels, FTP areas, CD-ROM images, etc. Indeed
someone with sufficient space and time (or speed) could build everything
for every architecture all at once (just like Plan 9 builds do), and all
from a non-current machine too!
The only tricky part is making sure that older tools can always build
newer tools, but that should be a major mandate anyway, if for no other
reason than that it helps porting to foreign architectures too. If this
means that all the build tools need to follow KNF too then so be it.
Indeed if the tools alone followed "KNF" then it wouldn't really be
necessary for the kernel itself to stick strictly to "KNF"! :-)
Someone actually working on the NetBSD build stuff should sit down with
FreeBSD and take a very good look at how it works, and also talk to the
FreeBSD developers responsible for it's build system to learn what they
think they could improve too. The only major failing of the FreeBSD
build scheme that I'm aware of is that it doesn't work as a cross-build
system and as such does require that you be running a "current" kernel.
A proper native cross-build system should eliminate this problem easily
Most people will already know that GCC (even the modern incarnation, so
far as I know) already obeys rules that allow it to be bootstrapped by
any other sufficiently capable C compiler and indeed any problems
related to this process are fairly well documented.
Greg A. Woods
+1 416 218-0098 VE3TCP <email@example.com> <robohack!woods>
Planix, Inc. <firstname.lastname@example.org>; Secrets of the Weird <email@example.com>