git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #68400 from angerman/feature/fix-gmp

[gmp] Fix shared windows cross compilation

commit24f38780dd887a53192bbcadae0c4fe66ec33614 authorMatthew Bauer <mjbauer95@gmail.com> dateSun 22 Dec 2019, 12:56 (7 years ago) parentc8f49fe0e79770
1 file changed+3−1
pkgs/development/libraries/gmp/6.x.nix+3−1
pkgs/development/libraries/gmp/6.x.nix+3−1
@@ -37,7 +37,9 @@ let self = stdenv.mkDerivation rec {
3737 "--build=${stdenv.buildPlatform.config}"
3838 ] ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
3939 ++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64"
40− ++ optional (with stdenv.hostPlatform; (useAndroidPrebuilt || useiOSPrebuilt) && !isx86) "--disable-assembly"
40+ # to build a .dll on windows, we need --disable-static + --enable-shared
41+ # see https://gmplib.org/manual/Notes-for-Particular-Systems.html
42+ ++ optional (!withStatic && stdenv.hostPlatform.isWindows) "--disable-static --enable-shared"
4143 ;
4244
4345 doCheck = true; # not cross;