mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
lib.systems: build Cygwin with the split GCC package set
Cygwin is the first platform to select `useGccNG`, and it is the natural
one: its libc is partly C++, so building `newlib-cygwin` needs C++ headers
before any libc exists. The monolithic compiler handles that with a
Cygwin-specific `langCC = stdenv.targetPlatform.isCygwin`; the split set
has a stage that provides them, `libstdcxx-no-libc`, which the preceding
commits add and wire in.
Derived from the platform rather than set on the example spec, so it holds
for any Cygwin triple, alongside the `useLLVM` rule it sits under. The
comment saying no platform selects it is retired here, since that is what
this changes.
This changes what `pkgsCross.x86_64-cygwin` builds with for everyone, not
only for callers passing the flag. Verified by building
`gccNGPackages.{libgcc,libstdcxx,libstdcxx-no-libc}` and `stdenv.cc` with
no `useGccNG` in the invocation; the derivations come out identical to
those built with the flag passed explicitly.
Assisted-by: Claude Code (Claude Opus 5)
This commit is contained in:
committed by
John Ericson
parent
6885c38863
commit
9f160d0987
@@ -161,14 +161,12 @@ let
|
||||
(with final; isWindows && isAarch64);
|
||||
|
||||
# Use the split GCC package set (`gccNGPackages`) instead of the
|
||||
# monolithic `gcc`. No platform selects it yet; it is opt-in, set
|
||||
# explicitly on a platform spec, so that the split set can be exercised
|
||||
# before anything depends on it.
|
||||
# monolithic `gcc`.
|
||||
#
|
||||
# I (@Ericson2314) plan on making obscure low-tier platforms (e.g.
|
||||
# NetBSD) use it soon, so we can dogfood GCC NG and thereby iron out its
|
||||
# bugs.
|
||||
useGccNG = false;
|
||||
# I (@Ericson2314) plan on making more obscure low-tier
|
||||
# platforms (e.g. NetBSD) use it soon, so we can dogfood GCC NG
|
||||
# and thereby iron out its bugs.
|
||||
useGccNG = final.isCygwin;
|
||||
|
||||
libc =
|
||||
if final.isDarwin then
|
||||
|
||||
Reference in New Issue
Block a user