On 25 January 2011 22:19, Kyle Girard wrote: > > I'm trying compile a version of gcc-4.5 on linux x86 for linux x86 which > is relocatable but I'm having difficulty. > > Does anyone have an example of how to build such a relocatable gcc? > > I've been building binutils, and gcc-4.5 over and over > with many different options. After reading the docs I thought the key > configure options are the --with-sysroot=/my/root and --prefix=/my/root > for both binutils and gcc with those options and it should be > relocatable but I've had no luck. For most of my attempts I can compile > binutils fine but gcc compilation fails saying it cannot file system > headers in /my/root/usr/include.. Am I missing a step somewhere? I've > even tried the bringing in eglibc/libc into the mix and trying to create > a cross-compiler from linux x86 to linux x86 but that was even worse. > > From the googling that I've done it doesn't seem like it's that > difficult. I think I'm missing some critical step somewhere
This question is more appropriate to the gcc-h...@gcc.gnu.org mailing list which is for help using and building gcc, the gcc@ list is for development of gcc. Please take any follow-up to gcc-help, thanks Have you tried simply building without --with-sysroot? That option causes the compiler to look for all system headers in /my/root instead of the default locations such as /usr. If you want to relocate the compiler to a system without /my/root then using sysroot is the wrong way to go.