!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

225 Members
74 Servers

Load older messages


SenderMessageTime
20 Jan 2025
@rosscomputerguy:matrix.orgTristan Ross Gotcha 19:14:40
@rosscomputerguy:matrix.orgTristan RossMaybe we have a base bootstrap that changes based on CC and adjusts things in later stages to accommodate for the other variables?19:15:27
@emilazy:matrix.orgemilyyou can compile GCC with Clang and Clang with GCC, right? so nominally the choice of bootstrap tools is independent of what compiler you want to use in the final environment, though in practice we likely have assumptions that break if they don't match (unlike cross bootstrap which inherently has to handle it - which is why unifying the two more would be good)19:26:17
@rosscomputerguy:matrix.orgTristan RossI'm not sure if GCC can be compiled with Clang, I know Clang can be compiled with LLVM. GNU things tend to not like Clang or LLVM stuff in certain cases.19:27:27
@rosscomputerguy:matrix.orgTristan Ross* I'm not sure if GCC can be compiled with Clang, I know Clang can be compiled with GCC. GNU things tend to not like Clang or LLVM stuff in certain cases.19:27:38
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
Randy Eckenrode's notion of native bootstrap as cross would help make bootstraps support more toolchains without causing a combinatorial explosion of special cases, I think

I don’t think I’m the only one with this idea. I’m pretty sure there is an open issue about it. Ideally, it should be possible to have a fully functional stdenv from just the bootstrap tools, then you can cross-compile to your target platform from there.

One thing that may be problematic is cc-wrapper’s suffix salt. You want bootstrap tools, first build, and final build to be treated as different platforms in spite of having the same salt. I also don’t know how the final cc can be used to build everything but its own dependencies.

19:30:03
@reckenrode:matrix.orgRandy Eckenrode One thing I would not mind is if the various pkgs reflected the stages of the bootstrap. 19:30:46
@reckenrode:matrix.orgRandy EckenrodeThey don’t right nowz19:31:15
@reckenrode:matrix.orgRandy Eckenrode * 19:31:25
@emilazy:matrix.orgemilyI feel like we ought to just use hashes for salts.19:32:22
@emilazy:matrix.orgemilysame platform different salt shouldn't be possible.19:32:35
@reckenrode:matrix.orgRandy Eckenrode
In reply to @rosscomputerguy:matrix.org
I'm not sure if GCC can be compiled with Clang, I know Clang can be compiled with GCC. GNU things tend to not like Clang or LLVM stuff in certain cases.
Darwin builds GCC with Clang.
19:33:14
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
same platform different salt shouldn't be possible.
Static builds. Darwin needs a static-aware salt because the build SDK is dynamic while the host SDK is static.
19:34:27
@rosscomputerguy:matrix.orgTristan Ross
In reply to @reckenrode:matrix.org
Darwin builds GCC with Clang.
Oh, I wasn't aware of that. I just know from experience with pkgsLLVM there's quite a few cases of using the gccStdenv
19:34:59
@emilazy:matrix.orgemilyyeah. if GCC couldn't build Clang we'd have no Clang on Linux. if Clang couldn't build GCC we'd have no GCC on Darwin.19:39:28
@emilazy:matrix.orgemilysince those are what we bootstrap from in practice19:39:37
@emilazy:matrix.orgemily
In reply to @reckenrode:matrix.org
Static builds. Darwin needs a static-aware salt because the build SDK is dynamic while the host SDK is static.
yeah. which is why it should just be a hash of the whole thing
19:40:06
@rosscomputerguy:matrix.orgTristan Ross After today's discussion, I'm really unsure the direction to go for the lib.systems PR. I can add the backwards compatibility bit but regarding toolchain, I just can't think of any alternatives. It's kinda needed so the other attributes default, it also makes using pkgsLLVM without specifying pkgs to NixOS easier. 20:33:36
@emilazy:matrix.orgemily we can just require all the attributes to be set. defining platforms is rare and it's good to be explicit. pkgsLLVM can do the same, what problems do you envision there? 20:50:18
@rosscomputerguy:matrix.orgTristan RossMaybe, I just think it's more convenient to have them inferred.20:52:12
@rosscomputerguy:matrix.orgTristan Ross And we'll need to find cases where to replace *Platform.toolchain == with the appropriate case. 20:54:22
@rosscomputerguy:matrix.orgTristan Ross pkgs/development/compilers/llvm/common/compiler-rt/default.nix kinda needs it. 20:55:17
@emilazy:matrix.orgemilyit's more convenient in a very small handful of places but introduces a footgun everywhere20:55:19
@emilazy:matrix.orgemilywhich will ultimately make using alternative toolchains harder and more broken20:55:41
@rosscomputerguy:matrix.orgTristan Ross Gotcha, maybe we use the backwards compatible use* until we can track down where things are and then switch the cases? 20:56:31
@rosscomputerguy:matrix.orgTristan Ross The use* would be based on the various attributes instead of the toolchain attribute. 20:57:06
@rosscomputerguy:matrix.orgTristan Ross So useLLVM checks if clang, compiler-rt, LLVM bintools, and libcxx are being used. 20:57:34
@emilazy:matrix.orgemilywe shouldn't use deprecated APIs in Nixpkgs - warnings will block the channel anyway20:58:35
@emilazy:matrix.orgemilysurely it doesn't take more than a few minutes to just try building libseccomp with the various stdenvs and see which ones break?20:59:06
@emilazy:matrix.orgemilythat needs narrowing down for an upstream report anyway20:59:36

Show newer messages


Back to Room ListRoom Version: 9