diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 87a3cafb267c..cb91a6413576 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15418,7 +15418,7 @@ with pkgs; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; - threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { }; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "4.8" else { }; isl = if !stdenv.isDarwin then isl_0_14 else null; cloog = if !stdenv.isDarwin then cloog else null; @@ -15432,7 +15432,7 @@ with pkgs; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; - threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { }; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "4.9" else { }; isl = if !stdenv.isDarwin then isl_0_11 else null; @@ -15449,7 +15449,7 @@ with pkgs; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; - threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { }; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "6" else { }; # gcc 10 is too strict to cross compile gcc <= 8 stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv; @@ -15468,7 +15468,7 @@ with pkgs; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; - threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { }; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "7" else { }; # gcc 10 is too strict to cross compile gcc <= 8 stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv; @@ -15483,7 +15483,7 @@ with pkgs; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; - threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { }; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "8" else { }; # gcc 10 is too strict to cross compile gcc <= 8 stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv; @@ -15498,7 +15498,7 @@ with pkgs; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; - threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { }; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "9" else { }; isl = if !stdenv.isDarwin then isl_0_20 else null; })); @@ -15510,7 +15510,7 @@ with pkgs; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; - threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { }; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "10" else { }; isl = if !stdenv.isDarwin then isl_0_20 else null; })); @@ -15522,7 +15522,7 @@ with pkgs; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; - threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { }; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "11" else { }; isl = if !stdenv.isDarwin then isl_0_20 else null; })); @@ -15534,7 +15534,7 @@ with pkgs; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; - threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { }; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "12" else { }; isl = if !stdenv.isDarwin then isl_0_20 else null; })); @@ -15546,7 +15546,7 @@ with pkgs; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; - threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { }; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor "13" else { }; isl = if !stdenv.isDarwin then isl_0_20 else null; })); @@ -17154,10 +17154,7 @@ with pkgs; # want the C++ library to be explicitly chosen by the caller, and null by # default. libcxx ? null - , extraPackages ? lib.optional (cc.isGNU or false && stdenv.targetPlatform.isMinGW) - (if lib.versionAtLeast cc.version "13" - then threadsCross.package - else threadsCross_pre_gcc_13.package) + , extraPackages ? lib.optional (cc.isGNU or false && stdenv.targetPlatform.isMinGW) ((threadsCrossFor cc.version).package) , nixSupport ? {} , ... } @ extraArgs: @@ -21189,20 +21186,17 @@ with pkgs; libcCross = assert stdenv.targetPlatform != stdenv.buildPlatform; libcCrossChooser stdenv.targetPlatform.libc; - threadsCross_pre_gcc_13 = if stdenv.targetPlatform.isMinGW && !(stdenv.targetPlatform.useLLVM or false) + threadsCross = threadsCrossFor null; + threadsCrossFor = cc_version: + if stdenv.targetPlatform.isMinGW && !(stdenv.targetPlatform.useLLVM or false) then { # other possible values: win32 or posix model = "mcf"; # For win32 or posix set this to null - package = targetPackages.windows.mcfgthreads_pre_gcc_13 or windows.mcfgthreads_pre_gcc_13; - } else { }; - - threadsCross = if stdenv.targetPlatform.isMinGW && !(stdenv.targetPlatform.useLLVM or false) - then { - # other possible values: win32 or posix - model = "mcf"; - # For win32 or posix set this to null - package = targetPackages.windows.mcfgthreads or windows.mcfgthreads; + package = + if cc_version == null || lib.versionAtLeast cc_version "13" + then targetPackages.windows.mcfgthreads or windows.mcfgthreads + else targetPackages.windows.mcfgthreads_pre_gcc_13 or windows.mcfgthreads_pre_gcc_13; } else { }; wasilibc = callPackage ../development/libraries/wasilibc {