| 11 Nov 2024 |
emily | I don't know anything about how the overlaying works, so maybe? :) | 14:52:48 |
emily | it'd make things more convenient for me at least | 14:52:52 |
Randy Eckenrode | https://github.com/NixOS/nixpkgs/blob/db2a0eaf13018f970376297fc53b4c41df5f193f/pkgs/stdenv/darwin/default.nix#L1268-L1277 | 14:53:41 |
Randy Eckenrode | I assume Linux could work the same way. Get the unversioned GCC’s version from the prior stage then set "gcc_${version}" = self.gcc; in the overlay.
| 14:54:29 |
Randy Eckenrode | LLVM is worse because of all the packages it has, but GCC should be pretty easy like that. | 14:55:01 |
Randy Eckenrode | (I did this because I got really tired of rebuilding the default version of LLVM just because something used llvmPackages_X.)
| 14:55:47 |
@trofi:matrix.org | Sure, overriding more would work just fine. | 16:47:30 |
sterni | Randy Eckenrode: do you think it is possible to get rid of this https://github.com/NixOS/nixpkgs/blob/03676a7e0ff1a54a9dabd749559ed6beca5abd5c/pkgs/stdenv/generic/default.nix#L117-L119? This is kind of annoying since it means that all of buildPackages gets rebuilt when changing targetPlatform even if derivations are target agnostic | 22:04:08 |
emily | I think we would have to move it into the compiler wrappers | 22:05:03 |
emily | which seems feasible? | 22:05:36 |
emily | there's a weird thing where the GCC build reads it and I don't entirely understand why | 22:05:45 |
emily | otherwise it's just an ld-wrapper thing that presumably could be set in the ld-wrapper Nix derivation | 22:06:01 |
emily | hopefully you understand pkgs/development/compilers/gcc/common/builder.nix better than I do đź« | 22:06:45 |
Randy Eckenrode | In reply to @emilazy:matrix.org there's a weird thing where the GCC build reads it and I don't entirely understand why Older Darwin deployment targets don’t support rpaths. I was looking for a way to detect a Darwin build in the GCC build. | 22:09:33 |
emily | oh, because of the awful ancient GCCs thing? | 22:09:52 |
emily | that's GCC < 10, right? | 22:09:58 |
Randy Eckenrode | Yes. | 22:10:02 |
Randy Eckenrode | The builder is pretty messy, so trying to conditionally doing it looked worse. | 22:10:09 |
emily | I'm dropping those anyway, so maybe problem solved? | 22:10:18 |
Randy Eckenrode | In reply to @sternenseemann:systemli.org Randy Eckenrode: do you think it is possible to get rid of this https://github.com/NixOS/nixpkgs/blob/03676a7e0ff1a54a9dabd749559ed6beca5abd5c/pkgs/stdenv/generic/default.nix#L117-L119? This is kind of annoying since it means that all of buildPackages gets rebuilt when changing targetPlatform even if derivations are target agnostic Darwin doesn’t need rpaths set though. How to handle that when Darwin is the target platform? | 22:11:00 |
Randy Eckenrode | In reply to @emilazy:matrix.org I'm dropping those anyway, so maybe problem solved? As long as Darwin doesn’t resume setting rpaths again. | 22:11:13 |
emily | would we want to? | 22:12:01 |
emily | In reply to @reckenrode:matrix.org Darwin doesn’t need rpaths set though. How to handle that when Darwin is the target platform? it's just a default for ld-wrapper, right? so it can go in the ld-wrapper derivation? | 22:12:15 |
emily | I guess that would still rebuild the world though. | 22:12:32 |
emily | it might just need patching in ld64. | 22:12:43 |
sterni | Randy Eckenrode: it should be moved into the cc wrapper somehow since then we can be sure that target is relevant | 22:12:45 |
sterni | can probably be put in its setup hook | 22:12:53 |
sterni | or maybe binutils | 22:12:57 |
emily | what's a binutils? :) | 22:13:16 |
Randy Eckenrode | In reply to @emilazy:matrix.org it might just need patching in ld64. Why would ld64 need patching? There’s nothing wrong with it. | 22:13:23 |