ghcHEAD: 8.11.20200505 -> 8.11.20200731
This commit is contained in:
parent
f50a34bbef
commit
ed1623421f
@ -20,9 +20,9 @@
|
|||||||
# build-time dependency too.
|
# build-time dependency too.
|
||||||
buildLlvmPackages, llvmPackages
|
buildLlvmPackages, llvmPackages
|
||||||
|
|
||||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
, # If enabled, GHC will be built with the GPL-free but slightly slower native
|
||||||
# library instead of the faster but GPLed integer-gmp library.
|
# bignum backend instead of the faster but GPLed gmp backend.
|
||||||
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms)
|
enableNativeBignum ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms)
|
||||||
, gmp
|
, gmp
|
||||||
|
|
||||||
, # If enabled, use -fPIC when compiling static libs.
|
, # If enabled, use -fPIC when compiling static libs.
|
||||||
@ -35,7 +35,7 @@
|
|||||||
, # Whether to build terminfo.
|
, # Whether to build terminfo.
|
||||||
enableTerminfo ? !stdenv.targetPlatform.isWindows
|
enableTerminfo ? !stdenv.targetPlatform.isWindows
|
||||||
|
|
||||||
, version ? "8.11.20200505"
|
, version ? "8.11.20200731"
|
||||||
, # What flavour to build. An empty string indicates no
|
, # What flavour to build. An empty string indicates no
|
||||||
# specific flavour and falls back to ghc default values.
|
# specific flavour and falls back to ghc default values.
|
||||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||||
@ -46,7 +46,7 @@
|
|||||||
disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
|
disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableIntegerSimple -> gmp != null;
|
assert !enableNativeBignum -> gmp != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||||
@ -64,7 +64,7 @@ let
|
|||||||
include mk/flavours/\$(BuildFlavour).mk
|
include mk/flavours/\$(BuildFlavour).mk
|
||||||
endif
|
endif
|
||||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||||
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
|
BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
|
||||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||||
CrossCompilePrefix = ${targetPrefix}
|
CrossCompilePrefix = ${targetPrefix}
|
||||||
@ -81,7 +81,7 @@ let
|
|||||||
# Splicer will pull out correct variations
|
# Splicer will pull out correct variations
|
||||||
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
|
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
|
||||||
++ [libffi]
|
++ [libffi]
|
||||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
++ stdenv.lib.optional (!enableNativeBignum) gmp
|
||||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
|
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
|
||||||
++ stdenv.lib.optional enableDwarf elfutils;
|
++ stdenv.lib.optional enableDwarf elfutils;
|
||||||
|
|
||||||
@ -103,8 +103,8 @@ stdenv.mkDerivation (rec {
|
|||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://gitlab.haskell.org/ghc/ghc.git/";
|
url = "https://gitlab.haskell.org/ghc/ghc.git/";
|
||||||
rev = "40c71c2cf38b4e134d81b7184a4d5e02949ae70c";
|
rev = "380638a33691ba43fdcd2e18bca636750e5f66f1";
|
||||||
sha256 = "04h9rcyzm9w3an1z00hjs062dp7dl19b8pkyxjsypr7a2i9dmvkb";
|
sha256 = "029cgiyhddvwnx5zx31i0vgj13zsvzb8fna99zr6ifscz6x7rid1";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
@ -173,7 +173,7 @@ stdenv.mkDerivation (rec {
|
|||||||
"--with-system-libffi"
|
"--with-system-libffi"
|
||||||
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
|
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
|
||||||
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
|
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
|
||||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
|
||||||
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
|
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
|
||||||
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||||
|
@ -26,6 +26,7 @@ self: super: {
|
|||||||
filepath = null;
|
filepath = null;
|
||||||
ghc-boot = null;
|
ghc-boot = null;
|
||||||
ghc-boot-th = null;
|
ghc-boot-th = null;
|
||||||
|
ghc-bignum = null;
|
||||||
ghc-compact = null;
|
ghc-compact = null;
|
||||||
ghc-heap = null;
|
ghc-heap = null;
|
||||||
ghci = null;
|
ghci = null;
|
||||||
|
@ -8,6 +8,12 @@ let
|
|||||||
"ghcjs"
|
"ghcjs"
|
||||||
"ghcjs86"
|
"ghcjs86"
|
||||||
"integer-simple"
|
"integer-simple"
|
||||||
|
"native-bignum"
|
||||||
|
"ghcHEAD"
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBignumIncludes = [
|
||||||
|
"ghcHEAD"
|
||||||
];
|
];
|
||||||
|
|
||||||
haskellLib = import ../development/haskell-modules/lib.nix {
|
haskellLib = import ../development/haskell-modules/lib.nix {
|
||||||
@ -97,6 +103,16 @@ in {
|
|||||||
in pkgs.recurseIntoAttrs (pkgs.lib.genAttrs
|
in pkgs.recurseIntoAttrs (pkgs.lib.genAttrs
|
||||||
integerSimpleGhcNames
|
integerSimpleGhcNames
|
||||||
(name: compiler.${name}.override { enableIntegerSimple = true; }));
|
(name: compiler.${name}.override { enableIntegerSimple = true; }));
|
||||||
|
|
||||||
|
# Starting from GHC 9, integer-{simple,gmp} is replaced by ghc-bignum
|
||||||
|
# with "native" and "gmp" backends.
|
||||||
|
native-bignum = let
|
||||||
|
nativeBignumGhcNames = pkgs.lib.filter
|
||||||
|
(name: builtins.elem name nativeBignumIncludes)
|
||||||
|
(pkgs.lib.attrNames compiler);
|
||||||
|
in pkgs.recurseIntoAttrs (pkgs.lib.genAttrs
|
||||||
|
nativeBignumGhcNames
|
||||||
|
(name: compiler.${name}.override { enableNativeBignum = true; }));
|
||||||
};
|
};
|
||||||
|
|
||||||
# Default overrides that are applied to all package sets.
|
# Default overrides that are applied to all package sets.
|
||||||
@ -170,5 +186,16 @@ in {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
native-bignum = let
|
||||||
|
nativeBignumGhcNames = pkgs.lib.filter
|
||||||
|
(name: builtins.elem name nativeBignumIncludes)
|
||||||
|
(pkgs.lib.attrNames compiler);
|
||||||
|
in pkgs.lib.genAttrs nativeBignumGhcNames (name: packages.${name}.override {
|
||||||
|
ghc = bh.compiler.native-bignum.${name};
|
||||||
|
buildHaskellPackages = bh.packages.native-bignum.${name};
|
||||||
|
overrides = _self : _super : {
|
||||||
|
integer-gmp = null;
|
||||||
|
};
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user