diff options
Diffstat (limited to 'pkgs/development/compilers/gcc/4.8/default.nix')
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index e8892e17b71..eee2c1a97a8 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -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 |