default-gcc-version: init

This commit lifts the default gcc version to a top-level attribute
so it can be overridden.
This commit is contained in:
Adam Joseph
2023-08-20 22:59:59 -07:00
parent 1d9c231749
commit bb5ee1fe60
+6 -8
View File
@@ -15664,14 +15664,12 @@ with pkgs;
gbforth = callPackage ../development/compilers/gbforth { };
inherit (let
num =
if (with stdenv.targetPlatform; isVc4 || libc == "relibc") then 6
else 12;
numS = toString num;
in {
gcc = pkgs.${"gcc${numS}"};
gccFun = callPackage (../development/compilers/gcc + "/${numS}");
default-gcc-version =
if (with stdenv.targetPlatform; isVc4 || libc == "relibc") then 6
else 12;
inherit ({
gcc = pkgs.${"gcc${toString default-gcc-version}"};
gccFun = callPackage (../development/compilers/gcc + "/${toString default-gcc-version}");
}) gcc gccFun;
gcc-unwrapped = gcc.cc;