Subject: Re: different behaviour of system cc and TOOLDIR/cc
To: Frederick Bruckman <>
From: Todd Vierling <>
List: tech-toolchain
Date: 06/09/2003 12:40:48
On Mon, 9 Jun 2003, Frederick Bruckman wrote:

: --with-headers and --with-libs don't change the search path, by the
: way. They copy the target libs and headers into the compiler's search
: path: ${prefix}/${platform}/sys-include and ${prefix}/${platform}/lib.
: That appears to be the "supported" way to build a cross-compiler.

Which is perfectly fine, if someone were to waltz over to
src/gnu/dist/toolchain and do a "./configure --with-headers=...
--with-libs=..." by hand.

: As I said, I understand why the bootstrap compiler doesn't and
: shouldn't have access to any target libs and headers, but it would
: make sense to me to either stuff them in later,

Only if it's done as part of the "make build" step, and *only if* TOOLDIR is
not changed from the default (i.e. an objdir of src/tools).  The reason for
this is that one toolchain may be used on multiple (but differently dated or
tagged) source trees if TOOLDIR is external.

: or as I suggested, configure yet another toolchain (with i18n and shared
: bfd).

And this can be done by hand as I mentioned above for compiling third party

: Consider, the base sources were extensively modified to work with a
: no-defaults compiler. Do we really want to do that to "xsrc", which
: currently builds essentially out-of-the-box, the top-level makefile
: being essentially a handful of scripts?

If xsrc is being reworked to function with a cross-compiler *when built
using the NetBSD Makefile wrapper* (which already sets up necessary build
environment stuff), just tack the necessary options onto ${CC} in
xsrc/Makefile, probably by including <>.  Problem solved.

-- Todd Vierling <>