Files
nixpkgs/pkgs/development/compilers/gcc/ng/default.nix
John Ericson f0e0d97d92 gccNGPackages: add GCC 16
Same version and hash the monolithic set already packages, exposed as
`gccNGPackages_16`. The default stays at `default-gcc-version`, so nothing
switches over yet.

Every patch each component applies on 16 was checked by running `patch(1)`
over a pristine 16.2.0 tree, in list order, against the files `fetchpatch`
actually produces -- `git apply` is not a substitute, as it accepts context
that `patch` rejects.

Assisted-by: Claude Code (Claude Opus 5)
2026-09-03 13:19:26 -04:00

71 lines
1.7 KiB
Nix

{
lib,
callPackage,
stdenv,
stdenvAdapters,
gccVersions ? { },
patchesFn ? lib.id,
buildPackages,
targetPackages,
binutilsNoLibc,
binutils,
generateSplicesForMkScope,
...
}@packageSetArgs:
let
versions = {
"15.3.0".officialRelease.sha256 = "sha256-+lnBvu+JlfJ8TXHB3yJ1hxiTFdPm+v8btDBuYbDFMOs=";
"16.2.0".officialRelease.sha256 = "sha256-5nOOKVl/czJwcxqpBgDzf/3ARQed/CfsfoGSzIEIXD4=";
}
// gccVersions;
mkPackage =
{
name ? null,
officialRelease ? null,
gitRelease ? null,
monorepoSrc ? null,
version ? null,
}@args:
let
inherit
(import ./common/common-let.nix {
inherit
lib
gitRelease
officialRelease
version
;
})
releaseInfo
;
inherit (releaseInfo) release_version;
attrName =
args.name or (if (gitRelease != null) then "git" else lib.versions.major release_version);
in
lib.nameValuePair attrName (
lib.recurseIntoAttrs (
callPackage ./common (
{
inherit (stdenvAdapters) overrideCC;
inherit
officialRelease
gitRelease
monorepoSrc
version
patchesFn
;
buildGccPackages = buildPackages."gccNGPackages_${attrName}";
targetGccPackages = targetPackages."gccNGPackages_${attrName}" or gccPackages."${attrName}";
otherSplices = generateSplicesForMkScope "gccNGPackages_${attrName}";
}
// packageSetArgs # Allow overrides.
)
)
);
gccPackages = lib.mapAttrs' (version: args: mkPackage (args // { inherit version; })) versions;
in
gccPackages // { inherit mkPackage; }