------- Comment #4 from nightstrike at gmail dot com 2010-03-21 14:56 ------- (In reply to comment #3) > (In reply to comment #1) > > This is probably due to the way you built GCC. To have a completely > > relocatable toolchain, you need to use the --with-sysroot option to > > configure, > I've just checked out the latest sources from trunk, as well as consulted the > previously fetched sources. There are no such option to configure as > --with-sysroot. Did you mean --with-build-sysroot? >
No, --with-build-sysroot is used to specify the location of the sysroot during the build. --with-sysroot does so for during+after. So for instance, let's say that I wanted to build a toolchain that would run on a system where the sysroot was located at /opt/sys, but while building it, on my build machine, it's located at /build/sys. Therefore, I would do --with-build-sysroot=/build/sys --with-sysroot=/opt/sys. It's explained and documented on this page: http://gcc.gnu.org/install/configure.html Scroll down to "--with-sysroot" and you'll see it. Pay attention to this sentence in the description: "If the specified directory is a subdirectory of ${exec_prefix}, then it will be found relative to the GCC binaries if the installation tree is moved." I believe that's what you want. Note also that you can see the options used to build gcc in your "gcc -v" line in your first post. In there, it's clear that the toolchain you are using is not relocatable. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42886