From bcaea92a1217f6adb79bdb400f2bfffef97955ed Mon Sep 17 00:00:00 2001 From: Danny Wilson Date: Wed, 20 Feb 2013 09:20:07 +0000 Subject: [PATCH] Attempt at getting GCC 4.7 compiled on Illumos... No success yet :-( --- .../development/compilers/gcc/4.7/default.nix | 19 ++++++++++++++----- pkgs/development/libraries/cloog/default.nix | 4 ++-- .../development/libraries/gettext/default.nix | 2 ++ pkgs/development/libraries/isl/default.nix | 4 ++-- pkgs/development/libraries/mpc/default.nix | 4 ++-- pkgs/development/libraries/mpfr/default.nix | 6 +++--- pkgs/development/libraries/ppl/default.nix | 8 +++++--- pkgs/stdenv/default.nix | 1 + pkgs/stdenv/native/default.nix | 1 + pkgs/tools/archivers/cpio/default.nix | 4 ++-- pkgs/tools/misc/coreutils/default.nix | 1 + pkgs/top-level/all-packages.nix | 4 ++-- 12 files changed, 37 insertions(+), 21 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.7/default.nix b/pkgs/development/compilers/gcc/4.7/default.nix index 62a86751a712..6e8e5d86cc53 100644 --- a/pkgs/development/compilers/gcc/4.7/default.nix +++ b/pkgs/development/compilers/gcc/4.7/default.nix @@ -279,19 +279,25 @@ stdenv.mkDerivation ({ configureFlagsArray = stdenv.lib.optionals (ppl != null && ppl ? dontDisableStatic && ppl.dontDisableStatic) - [ "--with-host-libstdcxx=-lstdc++ -lgcc_s" ]; + [ "--with-host-libstdcxx=-lstdc++ -lgcc_s" ]; # 'iant' at #go-nuts@freenode, gccgo maintainer, said that # they have a bug in 4.7.1 if adding "--disable-static" dontDisableStatic = langGo; configureFlags = " + ${if stdenv.isSunOS then + " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " + + # On Illumos/Solaris GNU as is preferred + " --with-gnu-as --with-gnu-ld " + else ""} + --enable-lto ${if enableMultilib then "" else "--disable-multilib"} ${if enableShared then "" else "--disable-shared"} - ${if enablePlugin then "--enable-plugin" else ""} - ${if ppl != null then "--with-ppl=${ppl}" else ""} + ${if enablePlugin then "--enable-plugin" else "--disable-plugin"} + ${if ppl != null then "--with-ppl=${ppl} --disable-ppl-version-check" else ""} ${if cloog != null then - "--with-cloog=${cloog} --enable-cloog-backend=isl" + "--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl" else ""} ${if langJava then "--with-ecj-jar=${javaEcj} " + @@ -406,7 +412,9 @@ stdenv.mkDerivation ({ # Needed for the cross compilation to work AR = "ar"; LD = "ld"; - CC = "gcc"; + # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 + CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" + else "gcc"; # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find # the library headers and binaries, regarless of the language being @@ -496,6 +504,7 @@ stdenv.mkDerivation ({ installTargets = "install-gcc install-target-libgcc"; } + # Strip kills static libs of other archs (hence cross != null) // optionalAttrs (!stripped || cross != null) { dontStrip = true; NIX_STRIP_DEBUG = 0; } ) diff --git a/pkgs/development/libraries/cloog/default.nix b/pkgs/development/libraries/cloog/default.nix index ab5737b20ede..c3878ef4b789 100644 --- a/pkgs/development/libraries/cloog/default.nix +++ b/pkgs/development/libraries/cloog/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv, gmp, isl }: stdenv.mkDerivation rec { - name = "cloog-0.16.3"; + name = "cloog-0.18.0"; src = fetchurl { url = "http://www.bastoul.net/cloog/pages/download/count.php3?url=./${name}.tar.gz"; - sha256 = "0lzbsszfzsr0jfwkccfbsvx913d2yc45dqwa472plmxkhbwykmc9"; + sha256 = "1c4aa8dde7886be9cbe0f9069c334843b21028f61d344a2d685f88cb1dcf2228"; }; buildInputs = [ gmp ]; diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 5468c9f2336d..113093a80678 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation (rec { patches = [ ./no-gets.patch ]; + LDFLAGS = if stdenv.isSunOS then "-lsec -lavl" else ""; + configureFlags = [ "--disable-csharp" ] ++ (stdenv.lib.optionals stdenv.isCygwin [ # We have a static libiconv, so we can only build the static lib. diff --git a/pkgs/development/libraries/isl/default.nix b/pkgs/development/libraries/isl/default.nix index aaec37eae8f2..9097df78de3f 100644 --- a/pkgs/development/libraries/isl/default.nix +++ b/pkgs/development/libraries/isl/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, gmp }: stdenv.mkDerivation rec { - name = "isl-0.07"; # CLooG 0.16.3 fails to build with ISL 0.08. + name = "isl-0.11.1"; # CLooG 0.16.3 fails to build with ISL 0.08. src = fetchurl { urls = [ "http://www.kotnet.org/~skimo/isl/${name}.tar.bz2" "ftp://ftp.linux.student.kuleuven.be/pub/people/skimo/isl/${name}.tar.bz2" ]; - sha256 = "0kpxmvhrwwdygqqafqzjf9xiksq7paac2x24g9jhr3f9ajj3zkyx"; + sha256 = "095f4b54c88ca13a80d2b025d9c551f89ea7ba6f6201d701960bfe5c1466a98d"; }; buildInputs = [ gmp ]; diff --git a/pkgs/development/libraries/mpc/default.nix b/pkgs/development/libraries/mpc/default.nix index 3824e3d3755b..586658556db8 100644 --- a/pkgs/development/libraries/mpc/default.nix +++ b/pkgs/development/libraries/mpc/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv, gmp, mpfr }: stdenv.mkDerivation rec { - name = "mpc-0.9"; + name = "mpc-1.0.1"; src = fetchurl { url = "http://www.multiprecision.org/mpc/download/${name}.tar.gz"; - sha1 = "229722d553030734d49731844abfef7617b64f1a"; + sha256 = "ed5a815cfea525dc778df0cb37468b9c1b554aaf30d9328b1431ca705b7400ff"; }; buildInputs = [ gmp mpfr ]; diff --git a/pkgs/development/libraries/mpfr/default.nix b/pkgs/development/libraries/mpfr/default.nix index faa2e1b1a71e..802fd93f8cfc 100644 --- a/pkgs/development/libraries/mpfr/default.nix +++ b/pkgs/development/libraries/mpfr/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl, gmp}: stdenv.mkDerivation (rec { - name = "mpfr-3.1.0"; + name = "mpfr-3.1.1"; src = fetchurl { url = "mirror://gnu/mpfr/${name}.tar.bz2"; - sha256 = "105nx8qqx5x8f4rlplr2wk4cyv61iw5j3jgi2k21rpb8s6xbp9vl"; + sha256 = "1zfmmk4p26b67qpmh787p3dfxa71yd9mi02c4q45yf687pqw6rkv"; }; buildInputs = [ gmp ]; @@ -39,7 +39,7 @@ stdenv.mkDerivation (rec { // -(stdenv.lib.optionalAttrs stdenv.isFreeBSD { +(stdenv.lib.optionalAttrs (stdenv.isSunOS or stdenv.isFreeBSD) { /* Work around a FreeBSD bug that otherwise leads to segfaults in the test suite: http://hydra.bordeaux.inria.fr/build/34862 diff --git a/pkgs/development/libraries/ppl/default.nix b/pkgs/development/libraries/ppl/default.nix index b24b4e06cb94..0e1948b2fd0f 100644 --- a/pkgs/development/libraries/ppl/default.nix +++ b/pkgs/development/libraries/ppl/default.nix @@ -1,13 +1,13 @@ { fetchurl, stdenv, gmpxx, perl, gnum4 }: -let version = "0.11.2"; in +let version = "1.0"; in stdenv.mkDerivation rec { name = "ppl-${version}"; src = fetchurl { url = "http://bugseng.com/products/ppl/download/ftp/releases/${version}/ppl-${version}.tar.bz2"; - sha256 = "1sxviip4yk6gp453pid5scy1ba66dzdpr02i1416yk7lkv0x3yz3"; + sha256 = "c169e962b8a0f7b7bcde5c5e0e2235248f1d78b155dfad684591d1a57e330b54"; }; nativeBuildInputs = [ perl gnum4 ]; @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { configureFlags = "--disable-watchdog"; + patches = [ ./upstream-based.patch ]; + # 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. @@ -40,7 +42,7 @@ stdenv.mkDerivation rec { version of the simplex algorithm. ''; - homepage = http://www.cs.unipr.it/ppl/; + homepage = http://bugseng.com/products/ppl/; license = "GPLv3+"; diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix index ca90b46192e3..a2723f5575c0 100644 --- a/pkgs/stdenv/default.nix +++ b/pkgs/stdenv/default.nix @@ -62,5 +62,6 @@ rec { if stdenvType == "powerpc-linux" then /* stdenvLinux */ stdenvNative else if stdenvType == "i686-mingw" then stdenvMinGW else if stdenvType == "x86_64-darwin" then stdenvNix else + if stdenvType == "x86_64-solaris" then stdenvNix else stdenvNative; } diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix index 524b2a53337b..f303e47fd5db 100644 --- a/pkgs/stdenv/native/default.nix +++ b/pkgs/stdenv/native/default.nix @@ -9,6 +9,7 @@ rec { path = (if system == "i686-solaris" then [ "/usr/gnu" ] else []) ++ (if system == "i686-netbsd" then [ "/usr/pkg" ] else []) ++ + (if system == "x86_64-solaris" then [ "/opt/local/gnu" ] else []) ++ ["/" "/usr" "/usr/local"]; prehookBase = '' diff --git a/pkgs/tools/archivers/cpio/default.nix b/pkgs/tools/archivers/cpio/default.nix index 1700f03d7bd8..525a64f9b821 100644 --- a/pkgs/tools/archivers/cpio/default.nix +++ b/pkgs/tools/archivers/cpio/default.nix @@ -4,8 +4,8 @@ stdenv.mkDerivation { name = "cpio-2.9"; src = fetchurl { - url = mirror://gnu/cpio/cpio-2.9.tar.bz2; - sha256 = "01s7f9hg8kgpis96j99hgkiqgdy53pm7qi7bhm3fzx58jfk5z6mv"; + url = mirror://gnu/cpio/cpio-2.11.tar.bz2; + sha256 = "bb820bfd96e74fc6ce43104f06fe733178517e7f5d1cdee553773e8eff7d5bbd"; }; patches = [ diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index 733c4218d831..69892cbfd738 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -49,6 +49,7 @@ stdenv.mkDerivation (rec { enableParallelBuilding = true; + LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lmp -lmd -lnsl -lsocket -lresolv"; NIX_LDFLAGS = stdenv.lib.optionalString selinuxSupport "-lsepol"; meta = { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6d9d534c4128..224369520610 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1938,7 +1938,7 @@ let gambit = callPackage ../development/compilers/gambit { }; - gcc = gcc46; + gcc = gcc47; gcc33 = wrapGCC (import ../development/compilers/gcc/3.3 { inherit fetchurl stdenv noSysDirs; @@ -3761,7 +3761,7 @@ let # The GHC bootstrap binaries link against libgmp.so.3, which is in GMP 4.x. gmp4 = callPackage ../development/libraries/gmp/4.3.2.nix { }; - gmp5 = callPackage ../development/libraries/gmp/5.0.5.nix { }; + gmp5 = callPackage ../development/libraries/gmp/5.1.1.nix { }; gmp51 = callPackage ../development/libraries/gmp/5.1.1.nix { };