haskell.compiler.ghc*: add enableUnregisterised
This commit is contained in:
committed by
sternenseemann
parent
f865044099
commit
35d77dde97
@@ -63,6 +63,12 @@
|
||||
, # Whether to disable the large address space allocator
|
||||
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
|
||||
disableLargeAddressSpace ? stdenv.targetPlatform.isiOS
|
||||
|
||||
, # Whether to build an unregisterised version of GHC.
|
||||
# GHC will normally auto-detect whether it can do a registered build, but this
|
||||
# option will force it to do an unregistered build when set to true.
|
||||
# See https://gitlab.haskell.org/ghc/ghc/-/wikis/building/unregisterised
|
||||
enableUnregisterised ? false
|
||||
}@args:
|
||||
|
||||
assert !enableIntegerSimple -> gmp != null;
|
||||
@@ -390,6 +396,8 @@ stdenv.mkDerivation (rec {
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
] ++ lib.optionals enableUnregisterised [
|
||||
"--enable-unregisterised"
|
||||
];
|
||||
|
||||
# Make sure we never relax`$PATH` and hooks support for compatibility.
|
||||
|
||||
@@ -229,6 +229,12 @@
|
||||
, # Whether to disable the large address space allocator
|
||||
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
|
||||
disableLargeAddressSpace ? stdenv.targetPlatform.isiOS
|
||||
|
||||
, # Whether to build an unregisterised version of GHC.
|
||||
# GHC will normally auto-detect whether it can do a registered build, but this
|
||||
# option will force it to do an unregistered build when set to true.
|
||||
# See https://gitlab.haskell.org/ghc/ghc/-/wikis/building/unregisterised
|
||||
enableUnregisterised ? false
|
||||
}:
|
||||
|
||||
assert !enableNativeBignum -> gmp != null;
|
||||
@@ -500,6 +506,8 @@ stdenv.mkDerivation ({
|
||||
# https://gitlab.haskell.org/ghc/ghc/-/issues/23188
|
||||
# https://github.com/haskell/cabal/issues/8882
|
||||
"fp_cv_prog_ar_supports_dash_l=no"
|
||||
] ++ lib.optionals enableUnregisterised [
|
||||
"--enable-unregisterised"
|
||||
];
|
||||
|
||||
# Make sure we never relax`$PATH` and hooks support for compatibility.
|
||||
|
||||
@@ -66,6 +66,14 @@
|
||||
, # Whether to disable the large address space allocator
|
||||
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
|
||||
disableLargeAddressSpace ? stdenv.targetPlatform.isiOS
|
||||
|
||||
, # Whether to build an unregisterised version of GHC.
|
||||
# GHC will normally auto-detect whether it can do a registered build, but this
|
||||
# option will force it to do an unregistered build when set to true.
|
||||
# See https://gitlab.haskell.org/ghc/ghc/-/wikis/building/unregisterised
|
||||
# Registerised RV64 compiler produces programs that segfault
|
||||
# See https://gitlab.haskell.org/ghc/ghc/-/issues/23957
|
||||
enableUnregisterised ? stdenv.hostPlatform.isRiscV64 || stdenv.targetPlatform.isRiscV64
|
||||
}:
|
||||
|
||||
assert !enableNativeBignum -> gmp != null;
|
||||
@@ -401,6 +409,8 @@ stdenv.mkDerivation (rec {
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
] ++ lib.optionals enableUnregisterised [
|
||||
"--enable-unregisterised"
|
||||
];
|
||||
|
||||
# Make sure we never relax`$PATH` and hooks support for compatibility.
|
||||
|
||||
Reference in New Issue
Block a user