From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZTsbE-0005ig-9L for mharc-grub-devel@gnu.org; Mon, 24 Aug 2015 10:19:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTmdb-0006r5-22 for grub-devel@gnu.org; Mon, 24 Aug 2015 03:57:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTmdW-0000M4-2E for grub-devel@gnu.org; Mon, 24 Aug 2015 03:57:50 -0400 Received: from world.peace.net ([50.252.239.5]:54178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTmdV-0000Lv-UN for grub-devel@gnu.org; Mon, 24 Aug 2015 03:57:45 -0400 Received: from [10.1.10.32] (helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1ZTmdL-00020T-05; Mon, 24 Aug 2015 03:57:35 -0400 From: Mark H Weaver To: Andrei Borzenkov Subject: Re: [PATCH] Ensure that MIPS target code is compiled for the O32 ABI. In-Reply-To: <55DAC58C.1030105@gmail.com> References: <1440009323-8667-1-git-send-email-mhw@netris.org> <55D6A36D.205@gmail.com> <876147ryhy.fsf@netris.org> <55DAC58C.1030105@gmail.com> Date: Mon, 24 Aug 2015 03:57:12 -0400 Message-ID: <87si79nmp3.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 50.252.239.5 Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2015 07:57:52 -0000 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 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---