Subject: Re: different behaviour of system cc and TOOLDIR/cc
To: Todd Vierling <tv@pobox.com>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-toolchain
Date: 06/08/2003 21:10:17
On Sun, 8 Jun 2003, Todd Vierling wrote:

> You might also note that it's standard practice for a GCC cross-compiler to
> look in its ${libsubdir} for the "standard" system goop rather than /usr.
> This is because a GCC configured to be a cross-compiler deliberately avoids
> picking up /usr/include and /usr/lib -- as they are nearly always Wrong for
> a build with that cross-compiler.  The place where the $TOOLDIR-based gcc
> would find such files automatically, then, would be
> ${TOOLDIR}/${MACHINE_ARCH}-netbsd/lib (try plonking them in there and see!).

And the includes? When you compile a cross-compiler with
--with-headers=${DESTDIR}/usr/include, it stuffs them into
${TOOLDIR}/${MACHINE_GNU_PLATFORM}/sys-include. That directory isn't
in the paths, however, shown by ${TOOLDIR}/bin/gcc -print-search-dirs.

Frederick