@@ -7610,6 +7610,7 @@ in
76107610 };
76117611 bintools = binutils1;
76127612 libc = libcCross1;
7613+ extraPackages = [];
76137614 };
76147615
76157616 gcc48 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.8 {
@@ -7619,6 +7620,7 @@ in
76197620 profiledCompiler = with stdenv; (!isSunOS && !isDarwin && (isi686 || isx86_64));
76207621
76217622 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
7623+ threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;
76227624
76237625 isl = if !stdenv.isDarwin then isl_0_14 else null;
76247626 cloog = if !stdenv.isDarwin then cloog else null;
@@ -7632,6 +7634,7 @@ in
76327634 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
76337635
76347636 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
7637+ threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;
76357638
76367639 isl = if !stdenv.isDarwin then isl_0_11 else null;
76377640
@@ -7645,6 +7648,7 @@ in
76457648 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
76467649
76477650 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
7651+ threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;
76487652
76497653 isl = if !stdenv.isDarwin then isl_0_14 else null;
76507654 }));
@@ -7656,6 +7660,7 @@ in
76567660 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
76577661
76587662 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
7663+ threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;
76597664
76607665 isl = if !stdenv.isDarwin then isl_0_14 else null;
76617666 }));
@@ -7667,6 +7672,7 @@ in
76677672 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
76687673
76697674 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
7675+ threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;
76707676
76717677 isl = if !stdenv.isDarwin then isl_0_17 else null;
76727678 }));
@@ -7678,6 +7684,7 @@ in
76787684 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
76797685
76807686 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
7687+ threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;
76817688
76827689 isl = if !stdenv.isDarwin then isl_0_17 else null;
76837690 }));
@@ -7689,6 +7696,7 @@ in
76897696 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
76907697
76917698 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
7699+ threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;
76927700
76937701 isl = if !stdenv.isDarwin then isl_0_17 else null;
76947702 }));
@@ -7700,6 +7708,7 @@ in
77007708 profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
77017709
77027710 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
7711+ threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;
77037712
77047713 isl = isl_0_17;
77057714 }));
@@ -8497,6 +8506,7 @@ in
84978506 # provide the default choice, avoiding infinite recursion.
84988507 bintools ? if stdenv.targetPlatform.isDarwin then darwin.binutils else binutils
84998508 , libc ? bintools.libc
8509+ , extraPackages ? stdenv.lib.optional (cc.isGNU or false && stdenv.targetPlatform.isMinGW) threadsCross
85008510 , ...
85018511 } @ extraArgs:
85028512 callPackage ../build-support/cc-wrapper (let self = {
@@ -8508,7 +8518,7 @@ in
85088518 isGNU = cc.isGNU or false;
85098519 isClang = cc.isClang or false;
85108520
8511− inherit cc bintools libc;
8521+ inherit cc bintools libc extraPackages;
85128522 } // extraArgs; in self);
85138523
85148524 wrapCC = cc: wrapCCWith {
@@ -10973,6 +10983,11 @@ in
1097310983
1097410984 libcCross = assert stdenv.targetPlatform != stdenv.buildPlatform; libcCrossChooser stdenv.targetPlatform.libc;
1097510985
10986+ threadsCross =
10987+ if stdenv.targetPlatform.isMinGW && !(stdenv.targetPlatform.useLLVM or false)
10988+ then targetPackages.windows.mcfgthreads or windows.mcfgthreads
10989+ else null;
10990+
1097610991 wasilibc = callPackage ../development/libraries/wasilibc {
1097710992 stdenv = crossLibcStdenv;
1097810993 };