I am seeing the following two problems problem in gcc 4.1.1. The front-end driver contains paths from the --prefix where the toolchain was built, when it is installed at a different location. It was built using --with-sysroot.
I am aware of bug 17621, and have applied all of Carlos's patches to gcc 4.1.1. They do not fix the behavior that I am seeing. Secondly, some of the search paths are /usr/lib/.. and /lib/... which is inappropriate for a cross compiler. I have not tried a newer compiler, but I fixed these issues for myself in 4.1.1. (Which I have to do, since upgrading our toolchain is not in my organization's near-term schedule, and fixing problems in our current toolchain falls on me!) Patches and discussion follow. -- Summary: References to original ${prefix} paths in relocated toolchain and /lib and /usr/lib search paths appear in cross toolchain. Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kkylheku at gmail dot com GCC build triplet: i686-linux GCC host triplet: i686-linux GCC target triplet: mips64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35300