Subject: Re: building NetBSD on Tru64 UNIX
To: Rumi Szabolcs <>
From: Jochen Kunz <>
List: tech-toolchain
Date: 07/04/2004 15:20:36
On Sat, 3 Jul 2004 21:54:55 +0200
Rumi Szabolcs <> wrote:

> Well, I think it should not be necessary to aggressively convert a
> Tru64, IRIX, AIX, or whatever system into a gn00box to compile the
> netbsd toolchain.
In an ideal world any POSIX system should be able to cross compile
NetBSD. In the real world actual systems differ here and there. Some
tools that come with a commercial UNIX are simply broken. Using some GNU
tools can equal out those differences. You don't need that much GNU
tools. Some basic parts like bash, awk, sed may suffice.

> One approach would be to completely avoid gnuisms in the
> shell/awk/C/C++ code inside the whole toolchain that can lead to a
> breakage.
Well. Writing real portable software is not that easy. One problem alone
is that you need access to several different UNIX systems, possibly
multiplied by various versions, to test your work. Every time you make a
change you have to run regression tests... A very time consuming task.

> Another
> approach could be to create an additional layer of compatibility,
> something like a bootstrap which provides the GNU toolkit necessary
> to build the toolchain inside the separated netbsd build tree, so that
> one does not have to install half of on a real UNIX system
> by hand, and especially not have to replace the system wide shells or
> a system wide commercial C/C++ package with gcc via symlinks or
> anything like that.
You don't need to replace tools system wide. Just put the needed tools
into an extra bin directory. Make that the first component in your $PATH
and use this modified $PATH only for building the NetBSD tool chain.
With system-cc versus gcc: Try if system-cc works and only switch to gcc
if it don't. Or make patches so that system-cc works and send them back
via send-pr(1) to the NetBSD project. Maybe your patches will make it
into the NetBSD main source tree. (But sometimes this is not reasonible.
I needed some very special patches, even when using gcc, with "#ifdef
__sgi" to make the NetBSD tools compile on IRIX.)

> I think for those who maintain the toolchain it probably would not
> be all that hard to take either approach, and this would lead to a
> considerably higher number of systems where NetBSD can be compiled,
> in my opinion it would certainly be worth the effort.
See above. Most likely this will not work in the real world due to
ENOTIME. This is sad, but but live is bitter sometimes.