785e9630f0
libgmp comes with an extended config.guess script that features more accurate CPU detection. Unfortunately, use of that script causes the configure phase to choose fairly aggressive optimization flags and the resulting binaries might not work on architectures other than the machine those binaries were built on. The standard GNU config.guess script, however, recognizes a CPU type of 'x86' only. Thus, libgmp chooses the following settings: ABI="32" CC="gcc" CFLAGS="-m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentiumpro -march=pentiumpro" CPPFLAGS="" MPN_PATH=" x86/p6 x86 generic" svn path=/nixpkgs/branches/stdenv-updates/; revision=16084
25 lines
616 B
Nix
25 lines
616 B
Nix
{stdenv, fetchurl, m4, cxx ? true}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "gmp-4.3.1";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/gmp/${name}.tar.bz2";
|
|
sha256 = "1j5pklq36ivg2cim5wfysns229a544lqkimp3mlzkwjl513ra0ma";
|
|
};
|
|
|
|
buildInputs = [m4];
|
|
|
|
preConfigure = "ln -sf configfsf.guess config.guess";
|
|
|
|
configureFlags = if cxx then "--enable-cxx" else "--disable-cxx";
|
|
|
|
doCheck = true;
|
|
|
|
meta = {
|
|
description = "A free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers";
|
|
homepage = http://gmplib.org/;
|
|
license = "LGPL";
|
|
};
|
|
}
|