tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
gmp-*: Clean up configureFlags
John Ericson
7 years ago
f92ed873
db965063
+17
-15
3 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
gmp
4.3.2.nix
5.1.x.nix
6.x.nix
+6
-2
pkgs/development/libraries/gmp/4.3.2.nix
···
27
27
then "ln -sf configfsf.guess config.guess"
28
28
else ''echo "Darwin host is `./config.guess`."'';
29
29
30
30
-
configureFlags = (if cxx then "--enable-cxx" else "--disable-cxx") +
31
31
-
stdenv.lib.optionalString stdenv.isDarwin " ac_cv_build=x86_64-apple-darwin13.4.0 ac_cv_host=x86_64-apple-darwin13.4.0";
30
30
+
configureFlags = [
31
31
+
(stdenv.lib.enableFeature cxx "cxx")
32
32
+
] ++ stdenv.lib.optionals stdenv.isDarwin [
33
33
+
"ac_cv_build=x86_64-apple-darwin13.4.0"
34
34
+
"ac_cv_host=x86_64-apple-darwin13.4.0"
35
35
+
];
32
36
33
37
# The test t-lucnum_ui fails (on Linux/x86_64) when built with GCC 4.8.
34
38
# Newer versions of GMP don't have that issue anymore.
+6
-7
pkgs/development/libraries/gmp/5.1.x.nix
···
20
20
21
21
patches = if stdenv.isDarwin then [ ./need-size-t.patch ] else null;
22
22
23
23
-
configureFlags =
23
23
+
configureFlags = [
24
24
+
"--with-pic"
25
25
+
(stdenv.lib.enableFeature cxx "cxx")
24
26
# Build a "fat binary", with routines for several sub-architectures
25
27
# (x86), except on Solaris where some tests crash with "Memory fault".
26
28
# See <http://hydra.nixos.org/build/2760931>, for instance.
27
29
#
28
30
# no darwin because gmp uses ASM that clang doesn't like
29
29
-
optional (!stdenv.isSunOS) "--enable-fat"
30
30
-
++ (if cxx then [ "--enable-cxx" ]
31
31
-
else [ "--disable-cxx" ])
32
32
-
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
33
33
-
++ optional stdenv.isDarwin "ABI=64"
34
34
-
++ optional stdenv.is64bit "--with-pic"
31
31
+
(stdenv.lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat")
32
32
+
] ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
33
33
+
++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64"
35
34
;
36
35
37
36
# The config.guess in GMP tries to runtime-detect various
+5
-6
pkgs/development/libraries/gmp/6.x.nix
···
21
21
depsBuildBuild = [ buildPackages.stdenv.cc ];
22
22
nativeBuildInputs = [ m4 ];
23
23
24
24
-
configureFlags =
24
24
+
configureFlags = [
25
25
+
"--with-pic"
26
26
+
(stdenv.lib.enableFeature cxx "cxx")
25
27
# Build a "fat binary", with routines for several sub-architectures
26
28
# (x86), except on Solaris where some tests crash with "Memory fault".
27
29
# See <http://hydra.nixos.org/build/2760931>, for instance.
28
30
#
29
31
# no darwin because gmp uses ASM that clang doesn't like
30
30
-
optional (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "--enable-fat"
31
31
-
++ (if cxx then [ "--enable-cxx" ]
32
32
-
else [ "--disable-cxx" ])
33
33
-
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
32
32
+
(stdenv.lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat")
33
33
+
] ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
34
34
++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64"
35
35
-
++ optional stdenv.is64bit "--with-pic"
36
35
++ optional (with stdenv.hostPlatform; useAndroidPrebuilt || useiOSPrebuilt) "--disable-assembly"
37
36
;
38
37