Subject: Re: Crosscompiling
To: Perry E. Metzger <>
From: Bill Studenmund <>
List: tech-toolchain
Date: 12/27/1999 16:06:17
On 27 Dec 1999, Perry E. Metzger wrote:

> Bill Studenmund <> writes:
> > While I think it's great/important for us to support cross compilers in a
> > more intemate way than we do now, since the base system isn't modularized
> > like the package system is, I don't think we should put it in the base
> > source.
> I disagree. I very much believe it should be part of the base system.


What does making cross compilers part of the base system give us which
having them(*) in the package system does not?

In the past, we (NetBSD developers in general) have tried hard to make
sure that everything which goes into the base source really needs to be
there, especially now that we have pkgsrc.

(*) by "them" I mean taking what Frank's describing, basically adding a
PLIST, and using the package system to install them. This is a bit
different than the current pkgsrc/cross.

We're at eleven architectures now (alpha, arm32, i386, m68k, mipseb,
mipsel, ns32k, powerpc, sh3, sparc, vax), so we're talking about TEN cross
compilers! Each time someone adds a new architecture, we'd be adding a new
cross compiler.

That strikes me as a lot of bloat. I mean we're the OS which doesn't want
to add perl to the base distribution, and here we're talking about adding
10 cross compilers???

Oops. Since object format counts in the matrix above, we have i386-aout,
i386-elf, sparc-aout, and sparc-elf above. So we're at thirteen
architecture/formats, which would mean TWELVE cross-compilers! And since
we eventually want to push the a.out platforms (arm32 (?), m68k, ns32k,
sh3 (?), and vax) to ELF, that's an additional 5 architectures (assuming
the "?"'s are yes) yielding SEVENTEEN cross-compilers.

To estimate the size of the cross compilers themselves, I looked at the
size of cc1, cc1obj, cc1plus, as, and f771 on an i386-elf system. It was
just at 5 MB. Assuming that scales linearly, just the cross compilers we
have now would be 17*5 MB. That's 85 MB. I've been able to install entire
systems (without X) in about that much space. :-)

Also, how many times do you NEED ALL 17 cross compilers? I agree with the
sentement that we need to have all of them available and a few sites will
install them all, but I think most users only want to cross compile for
one or two targets. So I think we need something more fine-grained than a
cross compiler set. Right now our fine-grained install system is the
package system.

So again, why put this all in one basket, in the base system? No one who
has suggested it is an unreasonable person. What gains would we have? I
ask so that we can ensure that a packageized system meets these needs.

The one need I've heard broached is for an ELF system to be able to
compile an a.out version of ld for the a.out->elf migration. Having just
taught ofwboot (the macppc second stage boot loader) how to build an xcoff
version using an elf tool chain, I think this a.out on ELF toolchain
question is not difficult.

Take care,