guix-patches
[Top][All Lists]
Advanced

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

[bug#54239] [PATCH v2 1/5] gnu: Add cross-llvm.


From: Julien Lepiller
Subject: [bug#54239] [PATCH v2 1/5] gnu: Add cross-llvm.
Date: Sat, 5 Mar 2022 09:24:45 +0100

Le Fri, 04 Mar 2022 19:34:07 +0000,
Pierre Langlois <pierre.langlois@gmx.com> a écrit :

> Hi Julien,
> 
> Julien Lepiller <julien@lepiller.eu> writes:
> 
> > * gnu/packages/llvm.scm (cross-llvm): New variable.  
> 
> Do you really need to define a cross package for LLVM? In my
> experience it was possible to use the same llvm libraries for native
> and cross compilation. By default LLVM builds support for all
> supported targets (provided they are not "experimental" IIRC).

No, I don't think it's required.  I only need it so I can define a
default target that's different from the host.

> 
> Whereas for the clang package, at the moment it does have to be built
> for a specific target IIUC. I hope that one day we could have the same
> clang for native and cross compilation in Guix, but I don't think it
> can work without some serious re-design of how cross-compilation
> works. I've been trying to think about it but I don't yet have a good
> understanding of it.

You can use --target to control which target clang builds for (although
I don't know if our clang package can work like that). I wanted to have
a default target though, because passing --target all the time is
cumbersome and we would have to adjust all recipes to pass the flag.
With the default target set appropriately, (clang-for-target) will
always produce binaries for the correct architecture, whether
cross-compiling or not.

> 
> Thanks,
> Pierre
> 






reply via email to

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