[cfe-dev] Clang Cross Compiler - I'm almost there!

Joerg Sonnenberger joerg at britannica.bec.de
Wed Aug 15 02:35:52 PDT 2012


On Wed, Aug 15, 2012 at 09:26:14AM +0100, David Mirabito wrote:
> So I experimented with -sysroot and strace'd some invocations.
> With --sysroot, it seems that arm-none-eabi-clang always looks in
> <sysroot>/usr/include and <sysroot>/usr/local/include for the headers
> and then barfs when stdio.h is not found. 

This is a somewhat messy area, because the GNU toolchain uses two
different meanings for the term sysroot. The first one is what is used
by clang too. Here, sysroot references essentially an installed staging
area like you would use e.g. with Linux and could chroot into. All
search paths get prefixed by <sysroot>, except the toolchain specific
directories themselve. The second meaning in the GNU toolchain is to
refer to a directory under the tool install prefix. I don't think we
implement that ATM. I had no interest in that as it doesn't cover the
cross-compiling cases I am interested in.

Joerg



More information about the cfe-dev mailing list