diff --git a/pkgs/development/compilers/gcc-4.3/default.nix b/pkgs/development/compilers/gcc-4.3/default.nix index df4aca0bf558..a7c3c21fb51b 100644 --- a/pkgs/development/compilers/gcc-4.3/default.nix +++ b/pkgs/development/compilers/gcc-4.3/default.nix @@ -1,10 +1,12 @@ { stdenv, fetchurl, noSysDirs , langC ? true, langCC ? true, langFortran ? false, langTreelang ? false +, langJava ? false , profiledCompiler ? false , staticCompiler ? false , texinfo ? null , gmp, mpfr , bison ? null, flex ? null +, zlib ? null, boehmgc ? null , enableMultilib ? false , name ? "gcc" }: @@ -15,7 +17,7 @@ with stdenv.lib; let version = "4.3.3"; in -stdenv.mkDerivation { +stdenv.mkDerivation ({ name = "${name}-${version}"; builder = ./builder.sh; @@ -32,6 +34,10 @@ stdenv.mkDerivation { optional langFortran (fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2"; sha256 = "1b2wbysviyh7l9fqbd6zy5y6y89xgysy99gr8wx8xkc1hy2nwdsq"; + }) ++ + optional langJava (fetchurl { + url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2"; + sha256 = "1mlazpydd9qv7zwxkbb5sw3clfawfndhcc3f5lzycminvn6qmfkb"; }); patches = @@ -42,7 +48,10 @@ stdenv.mkDerivation { inherit noSysDirs profiledCompiler staticCompiler; buildInputs = [texinfo gmp mpfr] - ++ optionals langTreelang [bison flex]; + ++ (optionals langTreelang [bison flex]) + ++ (optional (zlib != null) zlib) + ++ (optional (boehmgc != null) boehmgc) + ; configureFlags = " ${if enableMultilib then "" else "--disable-multilib"} @@ -53,6 +62,7 @@ stdenv.mkDerivation { ( optional langC "c" ++ optional langCC "c++" ++ optional langFortran "fortran" + ++ optional langJava "java" ++ optional langTreelang "treelang" ) ) @@ -71,4 +81,10 @@ stdenv.mkDerivation { license = "GPL/LGPL"; description = "GNU Compiler Collection, 4.3.x"; }; -} +} // (if langJava then { + postConfigure = '' + make configure-gcc + sed -i gcc/Makefile -e 's@^CFLAGS = .*@& -I${zlib}/include@ ; s@^LDFLAGS = .*@& -L${zlib}/lib@' + sed -i gcc/Makefile -e 's@^CFLAGS = .*@& -I${boehmgc}/include@ ; s@^LDFLAGS = .*@& -L${boehmgc}/lib -lgc@' + ''; +} else {})) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2aa57449e6ff..fc95f7ef0b0c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1639,6 +1639,18 @@ let profiledCompiler = false; }); + gcj = gcj43; + + gcj43 = wrapGCC (gcc43_real.gcc.override { + name = "gcj"; + langJava = true; + langFortran = false; + langCC = true; + langC = false; + profiledCompiler = false; + inherit zlib boehmgc; + }); + # This new ghc stuff is under heavy development and will change ! # ===============================================================