------- Comment #7 from kkylheku at gmail dot com 2008-02-23 08:03 ------- Both my patches apply even if Carlos' patches are removed. The crti.o problem remains.
What's happening is that xgcc actually searches for the crti.o module, and then passes the full path to crti.o down to collect2 if it finds it. It looks like in the case when crti.o is not found, it simply passes the unprefixed name "crti.o" down to collect2, which bounces the arguments down to the linker and so it fails there. I made the compiler too smart :) so that even the intermediate stage xgcc restricts its search paths to its own installation. It thinks that its own temporary installation contains the sysroot, when in fact it should be ``breaking the rules'' and using the absolute path to the sysroot. I think that I'm hacking in the right direction here; there just has to be logic to have no path translation during staging. I have an idea, which I think is the cleanest solution for me. During the building of a shared gcc, quite simply, you have to fake out a miniature sysroot within gcc's own build directory. This is done by copyinig some files from the real sysroot (like crti.o, and some others) into the location where xgcc will expect them. This way there are no hacks in gcc itself to have a different search strategy during staging. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35300