gcc: Build MinGW stage two with threading library

Currently this is set up to be mcfgthreads, but it could be something
else instead.
This commit is contained in:
John Ericson
2019-11-11 11:02:38 -05:00
parent 999ef20129
commit 04cb05d20c
13 changed files with 130 additions and 28 deletions
@@ -1,4 +1,4 @@
{ stdenv, crossStageStatic, libcCross }:
{ stdenv, crossStageStatic, libcCross, threadsCross }:
let
inherit (stdenv) lib hostPlatform targetPlatform;
@@ -12,6 +12,7 @@ in
"-B${lib.getLib dep}${dep.libdir or "/lib"}"
]);
in mkFlags libcCross
++ lib.optionals (!crossStageStatic) (mkFlags threadsCross)
;
EXTRA_TARGET_LDFLAGS = let
@@ -24,5 +25,6 @@ in
"-Wl,-rpath-link,${lib.getLib dep}${dep.libdir or "/lib"}"
]));
in mkFlags libcCross
++ lib.optionals (!crossStageStatic) (mkFlags threadsCross)
;
}