From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Karetnikov Subject: Re: Initial cross-compilation support Date: Thu, 28 Mar 2013 13:35:08 +0400 Message-ID: <87wqsrrho3.fsf@karetnikov.org> References: <87txoxv7x9.fsf@gnu.org> <201303031726.08488.andreas@enge.fr> <8738wcyxs7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UL9Cn-0003mi-IU for bug-guix@gnu.org; Thu, 28 Mar 2013 05:33:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UL9Ck-0004wy-3e for bug-guix@gnu.org; Thu, 28 Mar 2013 05:33:09 -0400 In-Reply-To: <8738wcyxs7.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sun, 03 Mar 2013 22:32:40 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: bug-guix@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >> I think one needs to add the configure parameters "--with-arch=3Dmips64 = -- >> with-abi=3D64" to the cross build of gcc; and maybe "-march=3Dmip64 -mab= i=3D64"=20 >> to the binutils and glibc. Ludovic should know best where to do it in th= e=20 >> code. > I would add a keyword parameter to =E2=80=98cross-gcc=E2=80=99 to allow e= xtra configure > flags to be passed, or perhaps just an abstract #:abi flag. I tried to add "--with-arch=3Dmips64" "--with-abi=3D64" to '#:configure-flags' of 'cross-gcc'. It failed: /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-li= nux-gnu-4.7.2/libexec/gcc/mips64el-linux-gnu/ld: /nix/store/g9js73bwv1fl92h= 1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2/lib/gcc/mips= 64el-linux-gnu/4.7.2/libgcc.a(_fpcmp_parts_tf.o): ABI is incompatible with = that of the selected emulation /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-li= nux-gnu-4.7.2/libexec/gcc/mips64el-linux-gnu/ld: failed to merge target spe= cific data of file /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sa= ns-libc-mips64el-linux-gnu-4.7.2/lib/gcc/mips64el-linux-gnu/4.7.2/libgcc.a(= _fpcmp_parts_tf.o) [...] /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-li= nux-gnu-4.7.2/lib/gcc/mips64el-linux-gnu/4.7.2/libgcc.a(_addsub_tf.o): In f= unction `_fpadd_parts': /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mip= s64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:617:(.text+0x3a0)= : relocation truncated to fit: R_MIPS_GOT_DISP against `__thenan_tf' /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-li= nux-gnu-4.7.2/lib/gcc/mips64el-linux-gnu/4.7.2/libgcc.a(_addsub_tf.o): In f= unction `__addtf3': /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mip= s64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:744:(.text+0x3c4)= : relocation truncated to fit: R_MIPS_CALL16 against `__unpack_t' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mip= s64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:745:(.text+0x3e8)= : relocation truncated to fit: R_MIPS_CALL16 against `__unpack_t' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mip= s64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:747:(.text+0x3f8)= : relocation truncated to fit: R_MIPS_GOT_PAGE against `.text' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mip= s64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:747:(.text+0x404)= : relocation truncated to fit: R_MIPS_GOT_OFST against `.text' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mip= s64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:749:(.text+0x410)= : relocation truncated to fit: R_MIPS_CALL16 against `__pack_t' /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-li= nux-gnu-4.7.2/lib/gcc/mips64el-linux-gnu/4.7.2/libgcc.a(_addsub_tf.o): In f= unction `__subtf3': /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mip= s64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:764:(.text+0x454)= : relocation truncated to fit: R_MIPS_CALL16 against `__unpack_t' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mip= s64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:765:(.text+0x478)= : relocation truncated to fit: R_MIPS_CALL16 against `__unpack_t' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mip= s64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:769:(.text+0x488)= : relocation truncated to fit: R_MIPS_GOT_PAGE against `.text' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mip= s64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:769:(.text+0x49c)= : relocation truncated to fit: R_MIPS_GOT_OFST against `.text' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mip= s64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:771:(.text+0x4ac)= : additional relocation overflows omitted from the output collect2: error: ld returned 1 exit status make[2]: *** [/tmp/nix-build-glibc-cross-mips64el-linux-gnu-2.17.drv-0/buil= d/libc.so] Error 1 make[2]: Leaving directory `/tmp/nix-build-glibc-cross-mips64el-linux-gnu-2= .17.drv-0/glibc-2.17/elf' make[1]: *** [elf/subdir_lib] Error 2 make[1]: Leaving directory `/tmp/nix-build-glibc-cross-mips64el-linux-gnu-2= .17.drv-0/glibc-2.17' make: *** [all] Error 2 phase `build' failed after 286 seconds builder for `/nix/store/jk6f01ribh66daq71b1rzyijm7jqb8w1-glibc-cross-mips64= el-linux-gnu-2.17.drv' failed with exit code 1 @ build-failed /nix/store/jk6f01ribh66daq71b1rzyijm7jqb8w1-glibc-cross-mips= 64el-linux-gnu-2.17.drv /nix/store/74147nkjp39bpiqcpzvmj2gw6a216jzc-glibc-c= ross-mips64el-linux-gnu-2.17 1 builder for `/nix/store/jk6f01ribh66daq71b1r= zyijm7jqb8w1-glibc-cross-mips64el-linux-gnu-2.17.drv' failed with exit code= 1 cannot build derivation `/nix/store/68m2mhwasx65793bnnwl4kadckw2rh30-gcc-cr= oss-mips64el-linux-gnu-4.7.2.drv': 1 dependencies couldn't be built error: build failed: build of `/nix/store/68m2mhwasx65793bnnwl4kadckw2rh30-= gcc-cross-mips64el-linux-gnu-4.7.2.drv' failed I'd also wanted to add "-march=3Dmips64 -mabi=3D64" to 'cross' but failed to do it properly. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJRVA7RAAoJEM+IQzI9IQ38N/0P/1C3Sv4WWJcQPyr6Rh1J8VYP 4aGOUBoTeH4nMsISGkQlcfWRYDxDgjEXaqln9aEBF9kFTSJ4xNvFw6ozk81uSes9 BMBzOUzcJC6V1iDXPQxxhkOuvv2sMojI/vCQ7TvUImENHFQoO8b/gbb14ZUF3Tuj 10a1zi11FqKku1BRWLbAg9EOzFfwuhH9L3lL8JKpr+OvdymzM5ARqGhhYUlz9bgk /g1x4P+yFP0P5noA8nziWquQTFCp+mEbRmLMVqkRJbFw0EKG+KDN8Zhvq/PX2rH+ 0UDN+9ZA9ErlSGygJYYO9JFSGvypKtcs5poCg9X6//p1QIbjbus5u/KylW68jqOB slCSPaXvqWW+kihvpJXU6Zw6jlwPvjKSz8DNK10AYRqAvU6TGkAafBSh0rfn3WED Al41vP2uHNmb9rNnkY2HaoxEXPDGXTjIeSjfM1ReXxdKPR6GlPZ9mVwuG459H4Ko uHoHKRmK7hPiidqIAP+VpmxiZGE/f6kXfw0XqtJ5y+F+/s222X4MoTheczTE25Iv 9fqiHEktPgvIM8nhCCRmp3k3B0WCLGRlc8UZQ/AaTJCWdrwnzJeIIxF5jpKyxG0I 71ZLn9Wdpz8bMPlHhUaJQY3KinDx8JQXpIC2sE2khXBPSnLxQg2QdBPX7wEhC3vU fIFgcRquYcG2Q41YTpEi =8YFh -----END PGP SIGNATURE----- --=-=-=--