gmp-*: Clean up configureFlags

This commit is contained in:
John Ericson
2018-08-03 17:06:03 -04:00
parent db965063b3
commit f92ed87372
3 changed files with 17 additions and 15 deletions
+6 -7
View File
@@ -20,18 +20,17 @@ let self = stdenv.mkDerivation rec {
patches = if stdenv.isDarwin then [ ./need-size-t.patch ] else null;
configureFlags =
configureFlags = [
"--with-pic"
(stdenv.lib.enableFeature cxx "cxx")
# Build a "fat binary", with routines for several sub-architectures
# (x86), except on Solaris where some tests crash with "Memory fault".
# See <http://hydra.nixos.org/build/2760931>, for instance.
#
# no darwin because gmp uses ASM that clang doesn't like
optional (!stdenv.isSunOS) "--enable-fat"
++ (if cxx then [ "--enable-cxx" ]
else [ "--disable-cxx" ])
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
++ optional stdenv.isDarwin "ABI=64"
++ optional stdenv.is64bit "--with-pic"
(stdenv.lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat")
] ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64"
;
# The config.guess in GMP tries to runtime-detect various