diff options
Diffstat (limited to 'pkgs/top-level')
-rw-r--r-- | pkgs/top-level/all-packages.nix | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 808845cf401..db45bf56ef1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; }) gcc gccFun; gcc-unwrapped = gcc.cc; @@ -15772,6 +15770,7 @@ with pkgs; cc = gccFun { # copy-pasted inherit noSysDirs; + majorMinorVersion = toString default-gcc-version; reproducibleBuild = true; profiledCompiler = false; @@ -15799,24 +15798,25 @@ with pkgs; # This expression will be pushed into pkgs/development/compilers/gcc/common # once the top-level gcc/${version}/default.nix files are deduplicated. inherit - (lib.listToAttrs (map (version: - let atLeast = lib.versionAtLeast version; - attrName = "gcc${lib.replaceStrings ["."] [""] version}"; - pkg = lowPrio (wrapCC (callPackage (../development/compilers/gcc + "/${version}") ({ + (lib.listToAttrs (map (majorMinorVersion: + let atLeast = lib.versionAtLeast majorMinorVersion; + attrName = "gcc${lib.replaceStrings ["."] [""] majorMinorVersion}"; + pkg = lowPrio (wrapCC (callPackage ../development/compilers/gcc/default.nix ({ inherit noSysDirs; + inherit majorMinorVersion; reproducibleBuild = true; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; - threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor version else { }; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor majorMinorVersion else { }; isl = if stdenv.isDarwin then null else if atLeast "9" then isl_0_20 else if atLeast "7" then isl_0_17 else if atLeast "6" then (if stdenv.targetPlatform.isRedox then isl_0_17 else isl_0_14) else if atLeast "4.9" then isl_0_11 else /* "4.8" */ isl_0_14; - } // lib.optionalAttrs (version == "4.8") { + } // lib.optionalAttrs (majorMinorVersion == "4.8") { texinfo = texinfo5; # doesn't validate since 6.1 -> 6.3 bump - } // lib.optionalAttrs (version == "4.9") { + } // lib.optionalAttrs (majorMinorVersion == "4.9") { # Build fails on Darwin with clang stdenv = if stdenv.isDarwin then gccStdenv else stdenv; } // lib.optionalAttrs (!(atLeast "6")) { |