Nix Cross Compiling | 561 Members | |
| 121 Servers |
| Sender | Message | Time |
|---|---|---|
| 7 Dec 2024 | ||
| No need to duplicate it in your own uses | 20:59:43 | |
eg I need to set thumbv7em-none-eabi target to all invocations. | 21:00:18 | |
| (and ideally also set "target-cpu=cortex-m7") | 21:04:34 | |
| There's no support for setting target-cpu globally, if you want it in rust https://github.com/search?q=%2Ftarget-cpu%2F+lang%3Anix+NOT+is%3Afork&type=code | 21:08:19 | |
* (and ideally also set target-cpu=cortex-m7) | 21:08:26 | |
| Support for setting it would be added in https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/cc-wrapper/default.nix | 21:09:12 | |
| yea I guess that's to be expected, I could probably overlay it to the stdenv, I don't need deep dependency trees anyway but yes adding first-class supported would be very useful. | 21:09:34 | |
| any idea about the llvm target? | 21:09:45 | |
just setting config should be enough | 21:09:55 | |
| do you where the config -> llvm mapping occurs ? | 21:10:24 | |
| * do you know where the config -> llvm mapping occurs ? | 21:10:34 | |
| I think it was somewhere in the elaboration part, but I don't recall properly. | 21:11:15 | |
| https://github.com/NixOS/nixpkgs/blob/1e56a3b5efd3c4c1451f891863cfb72e471687f7/pkgs/build-support/cc-wrapper/default.nix#L717 https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/cc-wrapper/add-clang-cc-cflags-before.sh | 21:17:55 | |
| thanks a ton! | 21:18:16 | |
| 21:20:22 | |
| You'll have to add the cpu type | 21:21:01 | |
do git log -p -M --follow --stat -- lib/systems/parse.nix for how others have added them | 21:21:14 | |
| example https://github.com/NixOS/nixpkgs/commit/4db467f7e921cfe26c499076ea23044bb8a60ad6#diff-f970a71ad61b6b3ee7cfb369f3de4324885ff93d8d7f6b28253b0a812c166b13R93 | 21:21:37 | |
| 9 Dec 2024 | ||
| 10:53:55 | ||
| Hey everyone, I am setting up a remote builder VM in my Proxmox environment. The goal is to use this builder to compile x86_64 and aarch64 binaries, as my main system is an Apple Silicon Mac. (Hey, I heard virtualization while you virtualize the virtualizer.) The builder is up and running and doing its job. To compile aarch64 binaries, I configured boot.binfmt.emulatedSystems = [ "aarch64-linux" ] on the builder. Is there anything else I should consider or that you would recommend, as I am fairly new to the topic? Thank you! | 10:57:39 | |
In reply to@otanaut:matrix.orgThe builder is falling back to TCG to build the aarch64 binaries, not sure if that's "the best i get" or I am missing something. | 10:59:10 | |
| Artturin: I was hoping I might be able to get a libcxxClang package set by doing However this blows up deep in splicing on pkgsTargetTarget. Do you happen to know if there are any threads I can pull on here to make this work? | 22:05:41 | |
| * Artturin: I was hoping I might be able to get a libcxxClang package set by doing However this blows up deep in splicing on pkgsTargetTarget (infinite recursion). Do you happen to know if there are any threads I can pull on here to make this work? | 22:06:37 | |
| * Artturin: I was hoping I might be able to get a libcxxClang package set by doing However this blows up deep in splicing on pkgsTargetTarget (infinite recursion). Do you happen to know if there are any threads I can pull on here to make this work? | 22:13:42 | |
| Clearly there is pkgsLLVM, but I'm thinking about pkgsClang (but with libstd++) here. | 22:13:50 | |
Ah, apologies for the unnecesssary ping; I think if you make a stdenv with buildPackages.overrideCC baseStdenv buildPackages.llvmPackages.libstdcxxClang, it actually works! My error was to try and use libcxxClang, this one goes into infinite recursion, but a least that can be fixed by doing crossSystem = { useLLVM = true; }. | 22:17:53 | |
| 11 Dec 2024 | ||
| 14:20:37 | ||
| 16:37:58 | ||
Would somebody be willing to explain how to use pkgsLLVM to me? My goal is to cross compile using clang, and I know that pkgsLLVM is key, but can't really see how to use it. Additionally, to select the CPU and FPU, do I pass config = { mcpu = "<cpu>"; mfpu = "<fpu>"; }; respectively? Sorry if this is a noob question! | 16:40:15 | |
| * Would somebody be willing to explain how to use Moreover, is there a way to set | 16:42:47 | |