guix-devel
[Top][All Lists]
Advanced

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

Re: Using cross-compiler and host compiler in the same package


From: Ludovic Courtès
Subject: Re: Using cross-compiler and host compiler in the same package
Date: Sun, 19 Mar 2017 17:25:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Danny,

Sorry for the delay…

Danny Milosavljevic <address@hidden> skribis:

> I wanted to make sunxi-tools also compile the target tools.
>
> If one is on a non-armhf architecture some of the programs need to be 
> compiled with an armhf cross compiler and some (almost all) need to be 
> compiled using the host compiler.  Since the cross compiler is called 
> "arm-linux-gnueabihf-gcc" and not "gcc" (like the host compiler) that part is 
> no problem.  However, I also require armhf libc (to be linked statically) and 
> that doesn't work since one of the gccs always seems to pick up the wrong 
> libc.
>
> How can I fix it?

[...]

>     (native-inputs
>      `(("pkg-config" ,pkg-config)
>        ("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf"))))

‘cross-gcc’ takes an optional ‘libc’ argument.  Would it work to do:

  (let ((triplet "arm-linux-gnueabihf"))
    (cross-gcc triplet (cross-binutils triplet) (cross-libc triplet)))

?

> (Also, if I try to put that into gnu/packages/admin.scm , I get some circular 
> module dependency problem again... sigh)

Hmm, not sure why this happens.

HTH,
Ludo’.



reply via email to

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