Andrei Borzenkov <arvidj...@gmail.com> 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 Thread model: posix Found candidate GCC installation: /gnu/store/1phn21k7w04nsc38zlzrslqcqivcn714-gcc-4.9.3-lib/lib/gcc/mips64el-unknown-linux-gnu/4.9.3 Selected GCC installation: /gnu/store/1phn21k7w04nsc38zlzrslqcqivcn714-gcc-4.9.3-lib/lib/gcc/mips64el-unknown-linux-gnu/4.9.3 Candidate multilib: .; Selected multilib: .; "/gnu/store/hy0fp4z8ar362cnry5ifwmcrq2nqmjfc-clang-3.6.0/bin/clang-3.6" -cc1 -triple mips64el-unknown-linux-gnu -E -disable-free -disable-llvm-verifier -main-file-name mips.S -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -no-integrated-as -mconstructor-aliases -fuse-init-array -target-cpu mips32r2 -target-feature -n64 -target-feature +o32 -target-abi o32 -mfloat-abi hard -v -dwarf-column-info -resource-dir /gnu/store/hy0fp4z8ar362cnry5ifwmcrq2nqmjfc-clang-3.6.0/bin/../lib/clang/3.6.0 -I/home/mhw/.guix-profile/include -internal-isystem /usr/local/include -internal-isystem /gnu/store/hy0fp4z8ar362cnry5ifwmcrq2nqmjfc-clang-3.6.0/bin/../lib/clang/3.6.0/include -internal-externc-isystem /gnu/store/cncig2c9n92ndz97pw0ply1jjc0xycmf-glibc-2.21/include -fno-dwarf-directory-asm -fdebug-compilation-dir /home/mhw -ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -o /tmp/mips-a6494a.s -x assembler-with-cpp mips.S error: unknown target CPU 'mips32r2' mhw@librenote:~$ clang -v mips.S clang version 3.6.0 (tags/RELEASE_360/final) Target: mips64el-unknown-linux-gnu Thread model: posix Found candidate GCC installation: /gnu/store/1phn21k7w04nsc38zlzrslqcqivcn714-gcc-4.9.3-lib/lib/gcc/mips64el-unknown-linux-gnu/4.9.3 Selected GCC installation: /gnu/store/1phn21k7w04nsc38zlzrslqcqivcn714-gcc-4.9.3-lib/lib/gcc/mips64el-unknown-linux-gnu/4.9.3 Candidate multilib: .; Selected multilib: .; "/gnu/store/hy0fp4z8ar362cnry5ifwmcrq2nqmjfc-clang-3.6.0/bin/clang-3.6" -cc1 -triple mips64el-unknown-linux-gnu -E -disable-free -disable-llvm-verifier -main-file-name mips.S -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -no-integrated-as -mconstructor-aliases -fuse-init-array -target-cpu mips64r2 -target-feature -o32 -target-feature +n64 -target-abi n64 -mfloat-abi hard -v -dwarf-column-info -resource-dir /gnu/store/hy0fp4z8ar362cnry5ifwmcrq2nqmjfc-clang-3.6.0/bin/../lib/clang/3.6.0 -I/home/mhw/.guix-profile/include -internal-isystem /usr/local/include -internal-isystem /gnu/store/hy0fp4z8ar362cnry5ifwmcrq2nqmjfc-clang-3.6.0/bin/../lib/clang/3.6.0/include -internal-externc-isystem /gnu/store/cncig2c9n92ndz97pw0ply1jjc0xycmf-glibc-2.21/include -fno-dwarf-directory-asm -fdebug-compilation-dir /home/mhw -ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -o /tmp/mips-aee666.s -x assembler-with-cpp mips.S clang -cc1 version 3.6.0 based upon LLVM 3.6.0 default target mips64el-unknown-linux-gnu #include "..." search starts here: #include <...> search starts here: /home/mhw/.guix-profile/include /usr/local/include /gnu/store/hy0fp4z8ar362cnry5ifwmcrq2nqmjfc-clang-3.6.0/bin/../lib/clang/3.6.0/include /gnu/store/cncig2c9n92ndz97pw0ply1jjc0xycmf-glibc-2.21/include End of search list. "/home/mhw/.guix-profile/bin/as" -march mips64r2 -mabi 64 -mno-shared -KPIC -EL -o /tmp/mips-e5abd7.o /tmp/mips-aee666.s mips.S: Assembler messages: mips.S:7: Error: invalid operands `ld $t2,0($t6)' mips.S:10: Error: invalid operands `addiu $t7,$s0,(b-a)' clang-3.6: error: assembler command failed with exit code 1 (use -v to see invocation) mhw@librenote:~$ --8<---------------cut here---------------end--------------->8--- _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel