From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Initial cross-compilation support Date: Fri, 29 Mar 2013 10:46:48 +0100 Message-ID: <877gkqo7w7.fsf@gnu.org> References: <87txoxv7x9.fsf@gnu.org> <201303031726.08488.andreas@enge.fr> <8738wcyxs7.fsf@gnu.org> <87wqsrrho3.fsf@karetnikov.org> <878v57r6f4.fsf@gnu.org> <87boa38cj8.fsf@karetnikov.org> <87y5d7w3j5.fsf@gnu.org> <8738vf6kll.fsf@karetnikov.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULVtm-0004pL-Ae for bug-guix@gnu.org; Fri, 29 Mar 2013 05:47:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULVtj-00029S-5v for bug-guix@gnu.org; Fri, 29 Mar 2013 05:47:02 -0400 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=54582 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULVti-000272-Uw for bug-guix@gnu.org; Fri, 29 Mar 2013 05:46:59 -0400 In-Reply-To: <8738vf6kll.fsf@karetnikov.org> (Nikita Karetnikov's message of "Fri, 29 Mar 2013 05:49:42 +0400") 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: Nikita Karetnikov Cc: bug-guix@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello! (Please leave a bit more context when quoting messages, to make it easier for me to follow. ;-)) Nikita Karetnikov skribis: >>> Oh, I forgot to add the -K option. There are no logs. > >> -K has nothing to do with logs. :-) > > I meant the build tree. > > I can't find 'libgcc.a': The absolute file name appeared in your previous message: /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-= linux-gnu-4.7.2/lib/gcc/mips64el-linux-gnu/4.7.2/libgcc.a >> You did it right. :-) > > I don't think so. We were referring to quasiquote/unquote, and yes, you did it right. > config.log: > > configure:2785: gcc -c -mabi=3D64 -g -O2 --host=3Dmips64el-linux-gnu con= ftest.c >&5 > gcc: error: unrecognized argument in option '-mabi=3D64' > gcc: note: valid arguments to '-mabi=3D' are: ms sysv > gcc: error: unrecognized command line option '--host=3Dmips64el-linux-gnu' Ah, yes, that=E2=80=99s because CFLAGS is also used by the /native/ compile= r, hence this failure. After a bit of research, I found ports/sysdeps/mips/preconfigure (in libc). Apparently, it interprets the OS part of the target triplet to determine the ABI. So, if you specify --target=3Dmips64el-linux-gnuabi64, it should automatically build glibc for n64. The simplest way to do that is probably: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 69dc9f5..f4903d3 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -231,7 +231,7 @@ XBINUTILS and the cross tool chain." ;;; (define-public xgcc-mips64el - (let ((triplet "mips64el-linux-gnu")) + (let ((triplet "mips64el-linux-gnuabi64")) (cross-gcc triplet (cross-binutils triplet) (cross-libc triplet)))) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable (And you can remove previous attempts to specify CFLAGS.) Can you try that? TIA! Ludo=E2=80=99. --=-=-=--