[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Initial cross-compilation support

From: Ludovic Courtès
Subject: Re: Initial cross-compilation support
Date: Fri, 29 Mar 2013 10:46:48 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.3 (gnu/linux)


(Please leave a bit more context when quoting messages, to make it
easier for me to follow.  ;-))

Nikita Karetnikov <address@hidden> 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:


>> 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=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'

Ah, yes, that’s because CFLAGS is also used by the /native/ compiler,
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=mips64el-linux-gnuabi64,
it should automatically build glibc for n64.

The simplest way to do that is probably:

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))))
(And you can remove previous attempts to specify CFLAGS.)

Can you try that?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]