diff options
Diffstat (limited to 'pkgs/development/libraries/gmp/4.nix')
-rw-r--r-- | pkgs/development/libraries/gmp/4.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/development/libraries/gmp/4.nix b/pkgs/development/libraries/gmp/4.nix index c5a59045bbe9..4473e28585d9 100644 --- a/pkgs/development/libraries/gmp/4.nix +++ b/pkgs/development/libraries/gmp/4.nix @@ -4,7 +4,7 @@ let staticFlags = if static then " --enable-static --disable-shared" else ""; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (rec { name = "gmp-4.3.2"; src = fetchurl { @@ -16,7 +16,14 @@ stdenv.mkDerivation rec { # Prevent the build system from using sub-architecture-specific # instructions (e.g., SSE2 on i686). - preConfigure = "ln -sf configfsf.guess config.guess"; + # + # This is not a problem for Apple machines, which are all alike. In + # addition, `configfsf.guess' would return `i386-apple-darwin10.2.0' on + # `x86_64-darwin', leading to a 32-bit ABI build, which is undesirable. + preConfigure = + if !stdenv.isDarwin + then "ln -sf configfsf.guess config.guess" + else ''echo "Darwin host is `./config.guess`."''; configureFlags = (if cxx then "--enable-cxx" else "--disable-cxx") + staticFlags; @@ -57,3 +64,10 @@ stdenv.mkDerivation rec { platforms = stdenv.lib.platforms.all; }; } + +// + +# Don't run the native `strip' when cross-compiling. +(if (stdenv ? cross) + then { dontStrip = true; } + else { })) |