From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Karetnikov Subject: Re: Initial cross-compilation support Date: Fri, 29 Mar 2013 05:49:42 +0400 Message-ID: <8738vf6kll.fsf@karetnikov.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> 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]:44364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULOPt-0003TK-MO for bug-guix@gnu.org; Thu, 28 Mar 2013 21:47:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULOPq-0005Kt-OO for bug-guix@gnu.org; Thu, 28 Mar 2013 21:47:41 -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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: bug-guix@gnu.org --=-=-= >> 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': /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/build-i686-pc-linux-gnu/fixincludes# file fixincl.o fixincl.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped > You did it right. :-) I don't think so. config.log: configure:2785: gcc -c -mabi=64 -g -O2 --host=mips64el-linux-gnu conftest.c >&5 gcc: error: unrecognized argument in option '-mabi=64' gcc: note: valid arguments to '-mabi=' are: ms sysv gcc: error: unrecognized command line option '--host=mips64el-linux-gnu' [...] ac_cv_env_CFLAGS_value='-mabi=64 -g -O2 --host=mips64el-linux-gnu' Then I tried to use #:make-flags instead: ((#:configure-flags flags) `(cons ,(string-append "--host=" target) ,flags)) ;; MIPS64 ((#:make-flags flags) `(cons "CFLAGS=-mabi=64 -g -O2" ,flags)) ((#:phases phases) ...) And got the same collect2 error as before: collect2: error: ld returned 1 exit status make[2]: *** [/tmp/nix-build-glibc-cross-mips64el-linux-gnu-2.17.drv-8/build/libc.so] Error 1 make[2]: Leaving directory `/tmp/nix-build-glibc-cross-mips64el-linux-gnu-2.17.drv-8/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-8/glibc-2.17' make: *** [all] Error 2 I checked 'config.log' and found out that 'ac_cv_env_CFLAGS_value=' is empty. Does it mean that #:make-flags are not honored? I tried to add the above 'CFLAGS' to GCC's #:make-flags, but it also failed. I also tried the same with '-march=mips64'. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJRVPM6AAoJEM+IQzI9IQ38aEoP/j1bqHuf/CknX8dFzPXDx74y ulRxPcxSUp7pH1d5r+NUI9GKJbzp8rc31Ag1fyef4XRUIk3e8qclmjZC+gsoL+Bl xsUMLjitUdprdmvkTyXfG5Y+rAY2myxKLqI5rKvMXhKQkRWDwFHgah6MqFXTCoJM smfFCNv0wieQYS5dZqVgu8PKolWo7r9+8GaM6wfasy8Zna7cTlLTI5KKXfg+WYpD BvpPSi/jLZ3zm4SRngEMlik47j4bexiENZ4ffnddRwWuleoyGha0IeSC1ca10H76 e24sWXAbRsoodWghP3RWcYfhNTuS1Gt5yMCSRF2XxviR0GEhDS8PWtX7qMwhAowc kco3m2N5eUKoTVIx/7Dy7aAkf7QQCNXCB1KGpcmHcW/Go6znL3p80GMUJV0WU1+f 3dM9nlzMf6cNHQNHRbVJtOEz8P2tz9X/vjpka4f8b6lUkagFbaV1BtRlx+wSamcA rZVh05oyfiHrMQ8RYqh7uzbn+fhCOdY8OB0i/2Wmr3z5j68rgdwn0xIMXZRoBf7P boBrmK0J8w1feOMFew3LPXh7lPU+kxgpUzg9iBQZID8Rrg5QNeVZUta0Qin+vw8b EHc1HXp+PMxC+O+Zb1erO17IJlf28/+CcZHpq3KcQU4Dk3LPZSwsHU6HJP6ZvE7j Ur7SfdWkPgoYwHzun7ET =4t6y -----END PGP SIGNATURE----- --=-=-=--