Oh My Freaking Head! How bloody painful do the GCC folks think they can be?
It seems that without a certain amount of prebuilt libraries and headers, you can’t just build a gcc cross compiler for a foreign system. Of course, I don’t have a linux PC handy to build my cross compiler on (and I don’t have the bandwidth/time to find a suitable combination of linux/glibc to build against) so that means I’m screwed. Or does it?
It seems I may just be in luck. I did manage to build a cross compiler but it didn’t target linux specifically. Instead, I targeted i386-elf. Unfortunately, this isn’t enough to work with GNU-EFI because it has no knowledge of EFI (I guess that’s tied to the linux target). I’m now in the process of bootstrapping linux/glibc with my i386-elf compiler to see if I can get something that the real cross compiler can use to build against.
Ugh.
Update: 24 April 2006
It seems my strategy is the correct one, as evidenced by this article. I’m having trouble getting glibc or newlib to compile but once that’s worked out, I should be almost there.