general questions about sysroot in building a toolchain

Dan Kegel
Thu Sep 29 13:51:00 GMT 2005

Robert P. J. Day wrote:
> ok, things are suddenly becoming clearer (i hope), and a good part of
> this has to do with whether i can relocate a generated toolchain.
> i can see that, if i use USE_SYSROOT=1 with crosstool, my generated
> cross-compiling utilities (sh3-unknown-linux-gnu-gcc/ld/etc.) have,
> embedded in them, the hard-coded full pathname of that sys-root
> directory where it was created during the build.

Whether or not you use sysroot, the toolchains have the hard-coded
full pathname of the installation directory in them.

> so, if i try to copy the generated toolchain "results" directory
> elsewhere, cross-compilation will break given that the sys-root
> directory isn't there anymore.
> in that case, what is the freedom in relocating a generated toolchain
> elsewhere if one uses sysroot during the build?

As others have said, the toolchain is still relocatable
even if you use --with-sysroot.  The guys who wrote --with-sysroot
were the same guys who made the toolchains relocatable
after installation, so they made sure of that.

- Dan

 > p.s.  i keep trying to ask a single-issue question, but each one seems
 > to get tangled up in related issues.  dang.

Next time you start asking detailed questions while trying
to track something down, please give a little more context;
maybe we could cut to the chase more quickly that way.

Trying to get a job as a c++ developer?  See

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list