From 3593d48524ed7d8bafe9cc6500a679362e4cee51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 22 Jan 2011 20:26:50 +0000 Subject: [PATCH] GMP: Further attempt to fix `x86_64-darwin' builds. svn path=/nixpkgs/trunk/; revision=25668 --- pkgs/development/libraries/gmp/4.nix | 9 ++++++++- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gmp/4.nix b/pkgs/development/libraries/gmp/4.nix index c5a59045bbe9..9fd5aeff6369 100644 --- a/pkgs/development/libraries/gmp/4.nix +++ b/pkgs/development/libraries/gmp/4.nix @@ -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; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7954ccde34bb..4360e6caf805 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3120,7 +3120,7 @@ let gmm = callPackage ../development/libraries/gmm { }; gmp = - if stdenv.isDarwin then + if stdenv.system == "i686-darwin" then # GMP 4.3.2 is broken on Darwin, so use 4.3.1. makeOverridable (import ../development/libraries/gmp/4.3.1.nix) { inherit stdenv fetchurl m4;