24.08.2015 10:57, Mark H Weaver пишет: > Andrei Borzenkov writes: >> Could you paste "clang -v" output for both cases? I believe I >> understand what's going on. > > Okay, I've included it below. It might be relevant to mention that the > MIPS port of GNU Guix is not a 'multilib' system: it includes support > only for the N32 ABI. However, our gcc is still capable of generating > freestanding code for the O32 ABI, as demonstrated by the fact that I've > been successfully building and using GRUB on it. > > Thanks, > Mark > > --8<---------------cut here---------------start------------->8--- > mhw@librenote:~$ clang -v -mabi=32 mips.S > clang version 3.6.0 (tags/RELEASE_360/final) > Target: mips64el-unknown-linux-gnu Yes, as expected. clang treats mips and mips64 as two different targets so o32 is invalid for mips64. Could you test attached patch for both gcc and clang? Use configure TARGET_CC=clang