Merge pull request #42037 from obsidiansystems/gmp-fixes
Fixes for GMP + prebuilt mobile
This commit is contained in:
commit
2c08c768ed
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
, # 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 slower integer-simple
|
||||||
# library instead of the faster but GPLed integer-gmp library.
|
# library instead of the faster but GPLed integer-gmp library.
|
||||||
enableIntegerSimple ? false, gmp ? null
|
enableIntegerSimple ? !(gmp.meta.available or false), gmp
|
||||||
|
|
||||||
, # If enabled, use -fPIC when compiling static libs.
|
, # If enabled, use -fPIC when compiling static libs.
|
||||||
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
||||||
@ -32,8 +32,6 @@
|
|||||||
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableIntegerSimple -> gmp != null;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (bootPkgs) ghc;
|
inherit (bootPkgs) ghc;
|
||||||
|
|
||||||
|
@ -27,12 +27,13 @@ let self = stdenv.mkDerivation rec {
|
|||||||
# See <http://hydra.nixos.org/build/2760931>, for instance.
|
# See <http://hydra.nixos.org/build/2760931>, for instance.
|
||||||
#
|
#
|
||||||
# no darwin because gmp uses ASM that clang doesn't like
|
# no darwin because gmp uses ASM that clang doesn't like
|
||||||
optional (!stdenv.isSunOS) "--enable-fat"
|
optional (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "--enable-fat"
|
||||||
++ (if cxx then [ "--enable-cxx" ]
|
++ (if cxx then [ "--enable-cxx" ]
|
||||||
else [ "--disable-cxx" ])
|
else [ "--disable-cxx" ])
|
||||||
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
|
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
|
||||||
++ optional stdenv.isDarwin "ABI=64"
|
++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64"
|
||||||
++ optional stdenv.is64bit "--with-pic"
|
++ optional stdenv.is64bit "--with-pic"
|
||||||
|
++ optional (with stdenv.hostPlatform; useAndroidPrebuilt || useiOSPrebuilt) "--disable-assembly"
|
||||||
;
|
;
|
||||||
|
|
||||||
# The config.guess in GMP tries to runtime-detect various
|
# The config.guess in GMP tries to runtime-detect various
|
||||||
@ -75,7 +76,6 @@ let self = stdenv.mkDerivation rec {
|
|||||||
asymptotically faster algorithms.
|
asymptotically faster algorithms.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
broken = with stdenv.hostPlatform; useAndroidPrebuilt || useiOSPrebuilt;
|
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = [ maintainers.peti maintainers.vrthra ];
|
maintainers = [ maintainers.peti maintainers.vrthra ];
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user