forked from mirrors/nixpkgs
gmp-*: Clean up configureFlags
This commit is contained in:
parent
db965063b3
commit
f92ed87372
|
@ -27,8 +27,12 @@ let self = stdenv.mkDerivation rec {
|
||||||
then "ln -sf configfsf.guess config.guess"
|
then "ln -sf configfsf.guess config.guess"
|
||||||
else ''echo "Darwin host is `./config.guess`."'';
|
else ''echo "Darwin host is `./config.guess`."'';
|
||||||
|
|
||||||
configureFlags = (if cxx then "--enable-cxx" else "--disable-cxx") +
|
configureFlags = [
|
||||||
stdenv.lib.optionalString stdenv.isDarwin " ac_cv_build=x86_64-apple-darwin13.4.0 ac_cv_host=x86_64-apple-darwin13.4.0";
|
(stdenv.lib.enableFeature cxx "cxx")
|
||||||
|
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||||
|
"ac_cv_build=x86_64-apple-darwin13.4.0"
|
||||||
|
"ac_cv_host=x86_64-apple-darwin13.4.0"
|
||||||
|
];
|
||||||
|
|
||||||
# The test t-lucnum_ui fails (on Linux/x86_64) when built with GCC 4.8.
|
# The test t-lucnum_ui fails (on Linux/x86_64) when built with GCC 4.8.
|
||||||
# Newer versions of GMP don't have that issue anymore.
|
# Newer versions of GMP don't have that issue anymore.
|
||||||
|
|
|
@ -20,18 +20,17 @@ let self = stdenv.mkDerivation rec {
|
||||||
|
|
||||||
patches = if stdenv.isDarwin then [ ./need-size-t.patch ] else null;
|
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
|
# Build a "fat binary", with routines for several sub-architectures
|
||||||
# (x86), except on Solaris where some tests crash with "Memory fault".
|
# (x86), except on Solaris where some tests crash with "Memory fault".
|
||||||
# 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"
|
(stdenv.lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat")
|
||||||
++ (if cxx then [ "--enable-cxx" ]
|
] ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
|
||||||
else [ "--disable-cxx" ])
|
++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64"
|
||||||
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
|
|
||||||
++ optional stdenv.isDarwin "ABI=64"
|
|
||||||
++ optional stdenv.is64bit "--with-pic"
|
|
||||||
;
|
;
|
||||||
|
|
||||||
# The config.guess in GMP tries to runtime-detect various
|
# The config.guess in GMP tries to runtime-detect various
|
||||||
|
|
|
@ -21,18 +21,17 @@ let self = stdenv.mkDerivation rec {
|
||||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||||
nativeBuildInputs = [ m4 ];
|
nativeBuildInputs = [ m4 ];
|
||||||
|
|
||||||
configureFlags =
|
configureFlags = [
|
||||||
|
"--with-pic"
|
||||||
|
(stdenv.lib.enableFeature cxx "cxx")
|
||||||
# Build a "fat binary", with routines for several sub-architectures
|
# Build a "fat binary", with routines for several sub-architectures
|
||||||
# (x86), except on Solaris where some tests crash with "Memory fault".
|
# (x86), except on Solaris where some tests crash with "Memory fault".
|
||||||
# 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 && stdenv.hostPlatform.isx86) "--enable-fat"
|
(stdenv.lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat")
|
||||||
++ (if cxx then [ "--enable-cxx" ]
|
] ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
|
||||||
else [ "--disable-cxx" ])
|
|
||||||
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
|
|
||||||
++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64"
|
++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64"
|
||||||
++ optional stdenv.is64bit "--with-pic"
|
|
||||||
++ optional (with stdenv.hostPlatform; useAndroidPrebuilt || useiOSPrebuilt) "--disable-assembly"
|
++ optional (with stdenv.hostPlatform; useAndroidPrebuilt || useiOSPrebuilt) "--disable-assembly"
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue