From d00b3037661eee1662100139dc301a0680fb198e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 3 May 2011 22:38:52 +0000 Subject: [PATCH] GMP: Use `--enable-fat' instead of tinkering with `config.guess'. svn path=/nixpkgs/branches/stdenv-updates/; revision=27126 --- pkgs/development/libraries/gmp/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/gmp/default.nix b/pkgs/development/libraries/gmp/default.nix index 338debaa81e7..1b079c051584 100644 --- a/pkgs/development/libraries/gmp/default.nix +++ b/pkgs/development/libraries/gmp/default.nix @@ -1,7 +1,8 @@ {stdenv, fetchurl, m4, cxx ? true, static ? false}: let - staticFlags = if static then " --enable-static --disable-shared" else ""; + staticFlags = stdenv.lib.optionals static + [ "--enable-static" "--disable-shared" ]; in stdenv.mkDerivation rec { @@ -14,12 +15,12 @@ stdenv.mkDerivation rec { buildNativeInputs = [m4]; - # Prevent the build system from using sub-architecture-specific - # instructions (e.g., SSE2 on i686). - preConfigure = "ln -sf configfsf.guess config.guess"; + configureFlags = + # Build a "fat binary", with routines for several sub-architectures (x86). + [ "--enable-fat" ] - configureFlags = if cxx then "--enable-cxx" else "--disable-cxx" + - staticFlags; + ++ (if cxx then [ "--enable-cxx" ] else [ "--disable-cxx" ]) + ++ staticFlags; dontDisableStatic = if static then true else false;