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:
@@ -23,6 +23,7 @@
|
||||
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
@@ -47,10 +48,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null;
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
|
||||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "4.8.5";
|
||||
let majorVersion = "4";
|
||||
version = "${majorVersion}.8.5";
|
||||
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
@@ -171,6 +176,8 @@ stdenv.mkDerivation ({
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
;
|
||||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
inherit (stdenv) lib;
|
||||
inherit version hostPlatform langJava langGo;
|
||||
@@ -253,7 +260,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit
|
||||
(import ../common/extra-target-flags.nix {
|
||||
inherit stdenv crossStageStatic libcCross;
|
||||
inherit stdenv crossStageStatic libcCross threadsCross;
|
||||
})
|
||||
EXTRA_TARGET_FLAGS
|
||||
EXTRA_TARGET_LDFLAGS
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
@@ -47,10 +48,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null;
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
|
||||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "4.9.4";
|
||||
let majorVersion = "4";
|
||||
version = "${majorVersion}.9.4";
|
||||
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
@@ -177,6 +182,8 @@ stdenv.mkDerivation ({
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
;
|
||||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
inherit (stdenv) lib;
|
||||
inherit version hostPlatform langJava langGo;
|
||||
@@ -259,7 +266,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit
|
||||
(import ../common/extra-target-flags.nix {
|
||||
inherit stdenv crossStageStatic libcCross;
|
||||
inherit stdenv crossStageStatic libcCross threadsCross;
|
||||
})
|
||||
EXTRA_TARGET_FLAGS
|
||||
EXTRA_TARGET_LDFLAGS
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
@@ -45,10 +46,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null;
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
|
||||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "5.5.0";
|
||||
let majorVersion = "5";
|
||||
version = "${majorVersion}.5.0";
|
||||
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
@@ -61,6 +66,10 @@ let version = "5.5.0";
|
||||
++ optional stdenv.hostPlatform.isMusl (fetchpatch {
|
||||
url = https://raw.githubusercontent.com/richfelker/musl-cross-make/e84b1bd1fc12a3def33111ca6df522cd6e5ec361/patches/gcc-5.3.0/0001-musl.diff;
|
||||
sha256 = "0pppbf8myi2kjhm3z3479ihn1cm60kycfv60gj8yy1bs0pl1qcfm";
|
||||
})
|
||||
++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
|
||||
sha256 = "074bl5n27d1ksa31pvzj4vd8xd46r118k0w94gdv3s1vydg7mah0";
|
||||
});
|
||||
|
||||
javaEcj = fetchurl {
|
||||
@@ -183,6 +192,8 @@ stdenv.mkDerivation ({
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
;
|
||||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
@@ -266,7 +277,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit
|
||||
(import ../common/extra-target-flags.nix {
|
||||
inherit stdenv crossStageStatic libcCross;
|
||||
inherit stdenv crossStageStatic libcCross threadsCross;
|
||||
})
|
||||
EXTRA_TARGET_FLAGS
|
||||
EXTRA_TARGET_LDFLAGS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, targetPackages, fetchurl, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
, langObjCpp ? stdenv.targetPlatform.isDarwin
|
||||
@@ -23,6 +23,7 @@
|
||||
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
@@ -45,10 +46,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null;
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
|
||||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "6.5.0";
|
||||
let majorVersion = "6";
|
||||
version = "${majorVersion}.5.0";
|
||||
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
@@ -58,7 +63,10 @@ let version = "6.5.0";
|
||||
++ optional noSysDirs ../no-sys-dirs.patch
|
||||
++ optional langFortran ../gfortran-driving.patch
|
||||
++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch
|
||||
;
|
||||
++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
|
||||
sha256 = "1c449jgm1vx9g4kv82bxmvlgrwb8f6kwkl0gqmjlmhf7f4hjy2nr";
|
||||
});
|
||||
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
@@ -185,6 +193,8 @@ stdenv.mkDerivation ({
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
;
|
||||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
@@ -268,7 +278,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit
|
||||
(import ../common/extra-target-flags.nix {
|
||||
inherit stdenv crossStageStatic libcCross;
|
||||
inherit stdenv crossStageStatic libcCross threadsCross;
|
||||
})
|
||||
EXTRA_TARGET_FLAGS
|
||||
EXTRA_TARGET_LDFLAGS
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
@@ -34,10 +35,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null;
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
|
||||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "7.4.0";
|
||||
let majorVersion = "7";
|
||||
version = "${majorVersion}.4.0";
|
||||
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
@@ -58,7 +63,11 @@ let version = "7.4.0";
|
||||
})
|
||||
++ optional langFortran ../gfortran-driving.patch
|
||||
++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch
|
||||
++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch;
|
||||
++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch
|
||||
++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
|
||||
sha256 = "1nyjnshpq5gbcbbpfv27hy4ajvycmgkpiabkjlxnnrnq1d99k1ay";
|
||||
});
|
||||
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
@@ -160,6 +169,8 @@ stdenv.mkDerivation ({
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
;
|
||||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
@@ -232,7 +243,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit
|
||||
(import ../common/extra-target-flags.nix {
|
||||
inherit stdenv crossStageStatic libcCross;
|
||||
inherit stdenv crossStageStatic libcCross threadsCross;
|
||||
})
|
||||
EXTRA_TARGET_FLAGS
|
||||
EXTRA_TARGET_LDFLAGS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, targetPackages, fetchurl, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
, langObjCpp ? stdenv.targetPlatform.isDarwin
|
||||
@@ -16,6 +16,7 @@
|
||||
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
@@ -34,10 +35,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null;
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
|
||||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "8.3.0";
|
||||
let majorVersion = "8";
|
||||
version = "${majorVersion}.3.0";
|
||||
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
@@ -50,7 +55,11 @@ let version = "8.3.0";
|
||||
}) */
|
||||
++ optional langFortran ../gfortran-driving.patch
|
||||
++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch
|
||||
++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch;
|
||||
++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch
|
||||
++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
|
||||
sha256 = "1in5kvcknlpi9z1vvjw6jfmwy8k12zvbqlqfnq84qpm99r0rh00a";
|
||||
});
|
||||
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
@@ -147,6 +156,8 @@ stdenv.mkDerivation ({
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
;
|
||||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
@@ -214,7 +225,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit
|
||||
(import ../common/extra-target-flags.nix {
|
||||
inherit stdenv crossStageStatic libcCross;
|
||||
inherit stdenv crossStageStatic libcCross threadsCross;
|
||||
})
|
||||
EXTRA_TARGET_FLAGS
|
||||
EXTRA_TARGET_LDFLAGS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, targetPackages, fetchurl, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
, langObjCpp ? stdenv.targetPlatform.isDarwin
|
||||
@@ -16,6 +16,7 @@
|
||||
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
@@ -34,10 +35,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null;
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
|
||||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "9.2.0";
|
||||
let majorVersion = "9";
|
||||
version = "${majorVersion}.2.0";
|
||||
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
@@ -49,7 +54,11 @@ let version = "9.2.0";
|
||||
sha256 = ""; # TODO: uncomment and check hash when available.
|
||||
}) */
|
||||
++ optional langFortran ../gfortran-driving.patch
|
||||
++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch;
|
||||
++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch
|
||||
++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
|
||||
sha256 = "1in5kvcknlpi9z1vvjw6jfmwy8k12zvbqlqfnq84qpm99r0rh00a";
|
||||
});
|
||||
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
@@ -146,6 +155,8 @@ stdenv.mkDerivation ({
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
;
|
||||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
@@ -213,7 +224,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit
|
||||
(import ../common/extra-target-flags.nix {
|
||||
inherit stdenv crossStageStatic libcCross;
|
||||
inherit stdenv crossStageStatic libcCross threadsCross;
|
||||
})
|
||||
EXTRA_TARGET_FLAGS
|
||||
EXTRA_TARGET_LDFLAGS
|
||||
|
||||
@@ -62,7 +62,7 @@ let
|
||||
"--enable-__cxa_atexit"
|
||||
"--enable-long-long"
|
||||
"--enable-threads=${if targetPlatform.isUnix then "posix"
|
||||
else if targetPlatform.isWindows then "win32"
|
||||
else if targetPlatform.isWindows then "mcf"
|
||||
else "single"}"
|
||||
"--enable-nls"
|
||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||
|
||||
@@ -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)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
"740f233da00c4fb5bcc225b2e29768824bcecc58"
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, targetPackages, fetchurl, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
, langObjCpp ? stdenv.targetPlatform.isDarwin
|
||||
@@ -16,6 +16,7 @@
|
||||
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
@@ -35,10 +36,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null;
|
||||
# The go frontend is written in c++
|
||||
assert langGo -> langCC;
|
||||
|
||||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let version = "7-20170409";
|
||||
let majorVersion = "7";
|
||||
version = "${majorVersion}-20170409";
|
||||
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
@@ -46,7 +51,11 @@ let version = "7-20170409";
|
||||
[ ]
|
||||
++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
|
||||
++ optional noSysDirs ../no-sys-dirs.patch
|
||||
++ optional langFortran ../gfortran-driving.patch;
|
||||
++ optional langFortran ../gfortran-driving.patch
|
||||
++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
|
||||
sha256 = "1nyjnshpq5gbcbbpfv27hy4ajvycmgkpiabkjlxnnrnq1d99k1ay";
|
||||
});
|
||||
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
@@ -118,6 +127,8 @@ stdenv.mkDerivation ({
|
||||
++ (optional hostPlatform.isDarwin gnused)
|
||||
;
|
||||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
@@ -186,7 +197,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit
|
||||
(import ../common/extra-target-flags.nix {
|
||||
inherit stdenv crossStageStatic libcCross;
|
||||
inherit stdenv crossStageStatic libcCross threadsCross;
|
||||
})
|
||||
EXTRA_TARGET_FLAGS
|
||||
EXTRA_TARGET_LDFLAGS
|
||||
|
||||
Reference in New Issue
Block a user