Subject: Re: different behaviour of system cc and TOOLDIR/cc
To: Ben Harris <>
From: Frederick Bruckman <>
List: tech-toolchain
Date: 06/08/2003 17:54:05
On Sun, 8 Jun 2003, Ben Harris wrote:

> In article <> you write:
> >On Fri, 6 Jun 2003, Matthias Drochner wrote:
> >> said:
> >> OK, but this is somehow unsatisfying because information
> >> is duplicated: The *.mk files have to know which crt* files
> >> are to be linked in, in addition to the compiler's specs.
> >
> >Yes, they do. I asked once, why the toolchain compiler isn't a fully
> >functional cross compiler, and I'm not sure I ever got a satisfactory
> >answer.
> One good reason is that the current arrangement gives us DESTDIR-independent
> toolchain binaries.  Thus, I don't have to recompile my tools every time I
> switch which DESTDIR I'm building to (e.g. to build a different MACHINE
> within a MACHINE_ARCH, which I do quite a lot).

Now that I've begun playing with building a cross compiler, I think
the main reason, is that the target libraries and includes aren't
available when the tooldir compiler is built. The straightforward way
to build a cross-compiler is to pass --with-headers and --with-libs to
configure, so it can populate the compilers directories with them (so
no hardcoded $DESTDIR), but that obviously wouldn't work for the
toolchain compiler, which is used to build the libraries.

I think we could still use a complete, integrated cross-compiler, for
building in "xsrc", say. Maybe a "cross-tools" target, that depends on
"distrib-dirs", "includes", and "do-lib", and create a full
cross-compiler in another directory (CROSSTOOLDIR)?