guix-devel
[Top][All Lists]
Advanced

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

Re: MinGW cross-compilation support


From: Ludovic Courtès
Subject: Re: MinGW cross-compilation support
Date: Wed, 07 Dec 2016 22:34:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hey!

Manolis Ragkousis <address@hidden> skribis:

> On 12/07/16 11:36, Ludovic Courtès wrote:

[...]

>> Adding a new cross-compilation target is a commitment.  So I hope you
>> and others will make sure it remains functional and useful!
>> 
>> I also think that together with Manolis and everyone else who’s played
>> with cross-compilation, we must clean up the mess that this has become.
>> ;-)  Namely, we must more clearly separate target-specific things and
>> also separate build-side from host-side code (in cross-base.scm).
>
> You are right, now and then cross-compilation breaks with no apparent
> reason as the code gets bigger and more complex (especially after adding
> non-Linux targets).
>
> I was thinking that maybe we need to abstract and remove all the target
> specific from cross-base.scm into new files. I haven't thought about the
> actual implementation yet, but it could be something like what I did
> with (cross-kernel-headers ...), which simplifies how (cross-libc ...)
> chooses which headers to use.
>
> Everyone please share any ideas you have :-)

I moved code that relates to phases to a new (gnu build cross-toolchain)
module in commit 3593e5d5c50b08cf69739aac98cd7c89247fa6da.  We could
probably do the same configure flags and make flags.

Going further I was thinking we could have an abstract representation of
“platform” to cater to GNU/Linux (including on ARM), GNU/Hurd, and maybe
MinGW, say:

  ;; Description of a platform supported by the GNU system.
  (define-record-type* <platform> platform make-platform
    platform?
    (triplet            platform-triplet)            ;"x86_64-linux-gnu"
    (system-type        platform-system-type)        ;"x86_64-linux"
    (linux-architecture platform-linux-architecture) ;"amd64"
    (kernel             platform-kernel)             ;<package>
    (ld.so              platform-ld.so)              ;"ld-linux-x86-64.so.2"
    (gcc                platform-gcc)                ;<package>
    (binutils           platform-binutils)           ;<package>
    (libc               platform-libc))              ;<package>

Probably this should include cross-compilation hints somehow.

Ideally it should be something like “sysdeps” in glibc: a mechanism that
allows us to separate platform-specific code from generic code.

Ludo’.



reply via email to

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