mingw-w64 libc: Multiple outputs and parallel builds
Also deduplicate more of the GCC derivations.
This commit is contained in:
@@ -49,7 +49,7 @@ let
|
||||
"--disable-decimal-float" # requires libc
|
||||
"--disable-libmpx" # requires libc
|
||||
] ++ lib.optionals crossMingw [
|
||||
"--with-headers=${libcCross}/include"
|
||||
"--with-headers=${lib.getDev libcCross}/include"
|
||||
"--with-gcc"
|
||||
"--with-gnu-as"
|
||||
"--with-gnu-ld"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{ stdenv, crossStageStatic, libcCross }:
|
||||
|
||||
let
|
||||
inherit (stdenv) lib hostPlatform targetPlatform;
|
||||
in
|
||||
|
||||
{
|
||||
EXTRA_TARGET_FLAGS = let
|
||||
mkFlags = dep: lib.optionals (targetPlatform != hostPlatform && dep != null) ([
|
||||
"-idirafter ${lib.getDev dep}${dep.incdir or "/include"}"
|
||||
] ++ stdenv.lib.optionals (! crossStageStatic) [
|
||||
"-B${lib.getLib dep}${dep.libdir or "/lib"}"
|
||||
]);
|
||||
in mkFlags libcCross
|
||||
;
|
||||
|
||||
EXTRA_TARGET_LDFLAGS = let
|
||||
mkFlags = dep: lib.optionals (targetPlatform != hostPlatform && dep != null) ([
|
||||
"-Wl,-L${lib.getLib dep}${dep.libdir or "/lib"}"
|
||||
] ++ (if crossStageStatic then [
|
||||
"-B${lib.getLib dep}${dep.libdir or "/lib"}"
|
||||
] else [
|
||||
"-Wl,-rpath,${lib.getLib dep}${dep.libdir or "/lib"}"
|
||||
"-Wl,-rpath-link,${lib.getLib dep}${dep.libdir or "/lib"}"
|
||||
]));
|
||||
in mkFlags libcCross
|
||||
;
|
||||
}
|
||||
Reference in New Issue
Block a user