!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

398 Members
92 Servers

Load older messages


SenderMessageTime
8 Oct 2024
@artturin:matrix.orgArtturin

I also switched from using buildPackages to pkgs to improve
cross-compilation compatibility.

02:10:47
@artturin:matrix.orgArtturin Comment on the pr and tell what you're doing and how it broke @colemickens:matrix.org 02:11:06
@colemickens:matrix.orgcolemickens Thanks Artturin I'll play on my hm branch and then send feedback. :). 02:12:04
@colemickens:matrix.orgcolemickens * Thanks Artturin I'll play on my hm branch and then send feedback. :). (EDIT: and thanks again for replying) 02:17:13
9 Oct 2024
@aliarokapis:matrix.orgAlexandros Liarokapis joined the room.20:12:12
@aliarokapis:matrix.orgAlexandros Liarokapisis there an easy way to get a proper cross-compilation stdenv based on clang and the target approach ?20:13:04
@rosscomputerguy:matrix.orgTristan Ross
In reply to @aliarokapis:matrix.org
is there an easy way to get a proper cross-compilation stdenv based on clang and the target approach ?
Cross compile between arch's while using clang?
20:14:21
@rosscomputerguy:matrix.orgTristan Ross pkgsLLVM exists 20:14:27
@rosscomputerguy:matrix.orgTristan Ross But that might not work until a certain PR is merged with pkgsCross 20:14:41
@aliarokapis:matrix.orgAlexandros Liarokapiscurrently I do the usual explicit instantiation stuff with crossSystem etc.20:15:55
@rosscomputerguy:matrix.orgTristan Ross Oh yeah, you can look at how pkgsLLVM is defined in pkgs/top-level/stage.nix 20:17:13
@aliarokapis:matrix.orgAlexandros Liarokapisthanks!20:17:25
@aliarokapis:matrix.orgAlexandros Liarokapisis this new?20:17:36
@rosscomputerguy:matrix.orgTristan RossNo, it's been there for quite some time.20:17:46
@rosscomputerguy:matrix.orgTristan RossAt least like 3 years I think.20:17:59
@rosscomputerguy:matrix.orgTristan RossNot everything is going to work, I have actually been one of the few people trying to make LLVM built nixpkgs better. I have https://github.com/RossComputerGuy/nixpkgs-llvm-ws/ which is a Flake that has an overlay which introduces fixes.20:19:00
@aliarokapis:matrix.orgAlexandros LiarokapisThis would be hugely helpful. I need to cross-compile for embedded platforms and I actually had to create a fully custom stdenv based on the arm toolchain which basically mimic-ed the whole cross stage. Gcc is not great in this regard either, the bootstrapping is cursed. LLVM has much better cross compilation support.20:21:45
@rosscomputerguy:matrix.orgTristan RossIf you like LLVM cross compiling, you should look at Zig. It ships libc sources so no need to bootstrap an entire cross compiling environment.20:22:55
@aliarokapis:matrix.orgAlexandros LiarokapisYea Zig is awesome in this regard.20:23:12
@rosscomputerguy:matrix.orgTristan Ross We actually have a pkgsZig in nixpkgs 20:23:31
@rosscomputerguy:matrix.orgTristan RossSo you can use Zig to cross compile20:23:38
@toxicfrog:ancilla.caToxicFrogOoo20:23:56
@toxicfrog:ancilla.caToxicFrogI should look at that sometime20:23:59
@rosscomputerguy:matrix.orgTristan Ross We also have pkgsArocc which arocc is a Zig written C compiler but Arocc is still quite experimental. 20:24:39
@aliarokapis:matrix.orgAlexandros Liarokapismain issue is I really need a cross-compiling C++ compiler as well.20:25:06
@rosscomputerguy:matrix.orgTristan RossI think Zig has some C++ stuff but no C++ stdlib20:25:25
@rosscomputerguy:matrix.orgTristan RossMainly just the compiler itself20:25:33
@rosscomputerguy:matrix.orgTristan RossIf you use Zig built with LLVM then it uses libclang which I believe includes the C++ compiler20:28:11
@aliarokapis:matrix.orgAlexandros LiarokapisI will definitely look into this, also the repo.20:28:38
@aliarokapis:matrix.orgAlexandros Liarokapisis this just delegating to clang ?20:32:23

Show newer messages


Back to Room ListRoom Version: 6