diff options
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/cloog-ppl/default.nix | 19 | ||||
-rw-r--r-- | pkgs/development/libraries/gmp/4.nix | 12 | ||||
-rw-r--r-- | pkgs/development/libraries/gmp/default.nix | 11 | ||||
-rw-r--r-- | pkgs/development/libraries/ppl/default.nix | 10 |
4 files changed, 41 insertions, 11 deletions
diff --git a/pkgs/development/libraries/cloog-ppl/default.nix b/pkgs/development/libraries/cloog-ppl/default.nix index 5738f76682a..0919afd83c2 100644 --- a/pkgs/development/libraries/cloog-ppl/default.nix +++ b/pkgs/development/libraries/cloog-ppl/default.nix @@ -1,19 +1,28 @@ -{ fetchurl, stdenv, ppl }: +{ fetchurl, stdenv, ppl, static ? false }: + +let + # --with-host-libstdcxx helps when *ppl* is built statically. + # But I will suppose that this is statically built only when ppl is also + # statically built. + staticFlags = assert static -> ppl.dontDisableStatic == true; + if static then " --enable-static --disable-shared --with-host-libstdcxx=-lstdc++" else ""; +in stdenv.mkDerivation rec { - name = "cloog-ppl-0.15.7"; + name = "cloog-ppl-0.15.9"; src = fetchurl { url = "mirror://gcc/infrastructure/${name}.tar.gz"; - sha256 = "0zb96524jk2l78gr5gw0wq3dnvdsmyr2av59v89zv5xcps417q55"; + sha256 = "19a2n75k3d3n8llng25f2g88lpvd4zn0lm073rkndjw6l6yd8m4c"; }; propagatedBuildInputs = [ ppl ]; - configureFlags = "--with-ppl=${ppl}"; + configureFlags = "--with-ppl=${ppl}" + staticFlags; + dontDisableStatic = if static then true else false; crossAttrs = { - configureFlags = "--with-ppl=${ppl.hostDrv}"; + configureFlags = "--with-ppl=${ppl.hostDrv}" + staticFlags; }; doCheck = true; diff --git a/pkgs/development/libraries/gmp/4.nix b/pkgs/development/libraries/gmp/4.nix index 8dffdcd7e6d..198fe15deea 100644 --- a/pkgs/development/libraries/gmp/4.nix +++ b/pkgs/development/libraries/gmp/4.nix @@ -1,4 +1,8 @@ -{stdenv, fetchurl, m4, cxx ? true}: +{stdenv, fetchurl, m4, cxx ? true, static ? false}: + +let + staticFlags = if static then " --enable-static --disable-shared" else ""; +in stdenv.mkDerivation rec { name = "gmp-4.3.2"; @@ -14,7 +18,11 @@ stdenv.mkDerivation rec { # instructions (e.g., SSE2 on i686). preConfigure = "ln -sf configfsf.guess config.guess"; - configureFlags = if cxx then "--enable-cxx" else "--disable-cxx"; + configureFlags = (if cxx then "--enable-cxx" else "--disable-cxx") + + staticFlags; + + dontDisableStatic = if static then true else false; + doCheck = true; diff --git a/pkgs/development/libraries/gmp/default.nix b/pkgs/development/libraries/gmp/default.nix index 08a03d715c2..338debaa81e 100644 --- a/pkgs/development/libraries/gmp/default.nix +++ b/pkgs/development/libraries/gmp/default.nix @@ -1,4 +1,8 @@ -{stdenv, fetchurl, m4, cxx ? true}: +{stdenv, fetchurl, m4, cxx ? true, static ? false}: + +let + staticFlags = if static then " --enable-static --disable-shared" else ""; +in stdenv.mkDerivation rec { name = "gmp-5.0.1"; @@ -14,7 +18,10 @@ stdenv.mkDerivation rec { # instructions (e.g., SSE2 on i686). preConfigure = "ln -sf configfsf.guess config.guess"; - configureFlags = if cxx then "--enable-cxx" else "--disable-cxx"; + configureFlags = if cxx then "--enable-cxx" else "--disable-cxx" + + staticFlags; + + dontDisableStatic = if static then true else false; doCheck = true; diff --git a/pkgs/development/libraries/ppl/default.nix b/pkgs/development/libraries/ppl/default.nix index cbe6ee21ecd..677d578e242 100644 --- a/pkgs/development/libraries/ppl/default.nix +++ b/pkgs/development/libraries/ppl/default.nix @@ -1,6 +1,9 @@ -{ fetchurl, stdenv, gmpxx, perl, gnum4 }: +{ fetchurl, stdenv, gmpxx, perl, gnum4, static ? false }: -let version = "0.10.2"; in +let + version = "0.10.2"; + staticFlags = if static then " --enable-static --disable-shared" else ""; +in stdenv.mkDerivation rec { name = "ppl-${version}"; @@ -12,6 +15,9 @@ let version = "0.10.2"; in buildNativeInputs = [ perl gnum4 ]; propagatedBuildInputs = [ gmpxx ]; + dontDisableStatic = if static then true else false; + configureFlags = staticFlags; + # Beware! It took ~6 hours to compile PPL and run its tests on a 1.2 GHz # x86_64 box. Nevertheless, being a dependency of GCC, it probably ought # to be tested. |