diff --git a/pkgs/development/compilers/gcc-4.6/builder.sh b/pkgs/development/compilers/gcc-4.6/builder.sh index aedd5b46b121..49e4b3e4cc7d 100644 --- a/pkgs/development/compilers/gcc-4.6/builder.sh +++ b/pkgs/development/compilers/gcc-4.6/builder.sh @@ -201,8 +201,9 @@ postInstall() { rm -rf $out/bin/gccbug # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out for i in $out/libexec/gcc/*/*/*; do - PREV_RPATH=`patchelf --print-rpath $i` - patchelf --set-rpath `echo $PREV_RPATH | sed 's,:[^:]*bootstrap-tools/lib,,'` $i + if PREV_RPATH=`patchelf --print-rpath $i`; then + patchelf --set-rpath `echo $PREV_RPATH | sed 's,:[^:]*bootstrap-tools/lib,,'` $i + fi done # Get rid of some "fixed" header files diff --git a/pkgs/development/compilers/gcc-4.6/default.nix b/pkgs/development/compilers/gcc-4.6/default.nix index 19efa57af8ee..d1b05690b568 100644 --- a/pkgs/development/compilers/gcc-4.6/default.nix +++ b/pkgs/development/compilers/gcc-4.6/default.nix @@ -10,7 +10,7 @@ , perl ? null # optional, for texi2pod (then pod2man); required for Java , gmp, mpfr, mpc, gettext, which , libelf # optional, for link-time optimizations (LTO) -, ppl ? null, cloogppl ? null # optional, for the Graphite optimization framework +, ppl ? null, cloogppl ? null, cloog ? null # optional, for the Graphite optimization framework. Cannot pass both cloog and cloogppl , bison ? null, flex ? null , zlib ? null, boehmgc ? null , zip ? null, unzip ? null, pkgconfig ? null, gtk ? null, libart_lgpl ? null @@ -38,10 +38,13 @@ assert langVhdl -> gnat != null; # LTO needs libelf and zlib. assert libelf != null -> zlib != null; +# Cannot use both cloog and cloog-ppl +assert cloog != null -> cloogppl == null; + with stdenv.lib; with builtins; -let version = "4.5.1"; +let version = "4.6.0"; javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at # `configure' time. @@ -97,6 +100,7 @@ let version = "4.5.1"; " --disable-threads " + " --disable-libmudflap " + " --disable-libgomp " + + " --disable-libquadmath" + " --disable-shared" + " --disable-decimal-float" # libdecnumber requires libc else @@ -202,6 +206,7 @@ stdenv.mkDerivation ({ buildInputs = [ gmp mpfr mpc libelf gettext ] ++ (optional (ppl != null) ppl) ++ (optional (cloogppl != null) cloogppl) + ++ (optional (cloog != null) cloog) ++ (optionals langTreelang [bison flex]) ++ (optional (zlib != null) zlib) ++ (optional (boehmgc != null) boehmgc) @@ -222,6 +227,9 @@ stdenv.mkDerivation ({ ${if enableShared then "" else "--disable-shared"} ${if ppl != null then "--with-ppl=${ppl}" else ""} ${if cloogppl != null then "--with-cloog=${cloogppl}" else ""} + ${if cloog != null then + "--with-cloog=${cloog} --enable-cloog-backend=isl" + else ""} ${if langJava then "--with-ecj-jar=${javaEcj} " + @@ -277,6 +285,7 @@ stdenv.mkDerivation ({ ${if enableShared then "" else "--disable-shared"} ${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""} ${if cloogppl != null then "--with-cloog=${cloogppl.hostDrv}" else ""} + ${if cloog != null then "--with-cloog=${cloog.hostDrv} --enable-cloog-backend=isl" else ""} ${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""} ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.hostDrv}" else ""} diff --git a/pkgs/development/compilers/gcc-4.6/sources.nix b/pkgs/development/compilers/gcc-4.6/sources.nix index 6059e03880b3..7d9a96863779 100644 --- a/pkgs/development/compilers/gcc-4.6/sources.nix +++ b/pkgs/development/compilers/gcc-4.6/sources.nix @@ -1,26 +1,26 @@ /* Automatically generated by `update-gcc.sh', do not edit. - For GCC 4.5.1. */ + For GCC 4.6.0. */ { fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda }: -assert version == "4.5.1"; +assert version == "4.6.0"; optional /* langC */ true (fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2"; - sha256 = "0sjjw3qfcpdk0fs5d2rhl0xqcaclg86ifbq45dbk9ca072l3fyxm"; + sha256 = "1hfgn36hs6jpaflhirmhavwjqzwa35fjl9i661j0lwp3dmbr2c9m"; }) ++ optional langCC (fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2"; - sha256 = "0j6ffb96b3r75hrjshg52llv21ax7r8jdx44hhj0maiisnl9wd55"; + sha256 = "0ga5vdyc1n0f60gph28zc08n05kxadm77q7kg9fgsfr0vvnjzsf2"; }) ++ optional langFortran (fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2"; - sha256 = "0xgwjc3h5fc5c100bnw24c35255il33lj5qbgpxf0zl8di2q13aw"; + sha256 = "1b09411jazcz0pq6plsmhgbb6mkz1l4d8j9p0iz56a4v5ccvn4jn"; }) ++ optional langJava (fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2"; - sha256 = "0mh37q4ibg05h1hdh39pkj1hycvdg6i79m4698knw7pppm14ax8q"; + sha256 = "15y8w9lvxg33kmiwcwwyj68w0ngay1fmshcirml7z3dlgjqm7lbd"; }) ++ optional langAda (fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-ada-${version}.tar.bz2"; - sha256 = "11chdbl7h046lnl83k79vj7dvgxz6kq7cnmwx94z644vaiflg153"; + sha256 = "1z207n5nxvzdfh26l5jyx13fam51hy0vwyan40jjavdh8pi1x81m"; }) ++ [] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd4a518d4e52..7df76743d53c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1663,6 +1663,8 @@ let gcc45 = gcc45_real; + gcc46 = gcc46_real; + gcc45_realCross = lib.addMetaAttrs { platforms = []; } (makeOverridable (import ../development/compilers/gcc-4.5) { inherit fetchurl stdenv texinfo gmp mpfr mpc libelf zlib @@ -1736,6 +1738,16 @@ let profiledCompiler = if stdenv.system == "armv5tel-linux" then false else true; })); + gcc46_real = lowPrio (wrapGCC (makeOverridable (import ../development/compilers/gcc-4.6) { + inherit fetchurl stdenv texinfo gmp mpfr mpc libelf zlib perl + cloog gettext which noSysDirs; + ppl = callPackage ../development/libraries/ppl/0.11.nix { }; + + # bootstrapping a profiled compiler does not work in the sheevaplug: + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944 + profiledCompiler = if stdenv.system == "armv5tel-linux" then false else true; + })); + gccApple = wrapGCC ( (if stdenv.system == "i686-darwin" then import ../development/compilers/gcc-apple else import ../development/compilers/gcc-apple64) { inherit fetchurl stdenv noSysDirs;