From fc6b345f945e33dc897b532a19aaf7dc401cc044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 25 May 2010 19:38:13 +0000 Subject: [PATCH] GCJ 4.5: Build with `--enable-java-home' & co. svn path=/nixpkgs/trunk/; revision=21973 --- pkgs/development/compilers/gcc-4.5/default.nix | 11 +++++++++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/gcc-4.5/default.nix b/pkgs/development/compilers/gcc-4.5/default.nix index 6f7854794b7..855ac76aebb 100644 --- a/pkgs/development/compilers/gcc-4.5/default.nix +++ b/pkgs/development/compilers/gcc-4.5/default.nix @@ -7,6 +7,7 @@ , staticCompiler ? false , enableShared ? true , texinfo ? null +, 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 @@ -29,7 +30,8 @@ assert langTreelang -> bison != null && flex != null; assert langJava -> zip != null && unzip != null - && zlib != null && boehmgc != null; + && zlib != null && boehmgc != null + && perl != null; # for `--enable-java-home' assert langAda -> gnatboot != null; assert langVhdl -> gnat != null; @@ -168,6 +170,7 @@ stdenv.mkDerivation ({ libcCross crossMingw; buildInputs = [ texinfo gmp mpfr mpc libelf gettext which ] + ++ (optional (perl != null) perl) ++ (optional (ppl != null) ppl) ++ (optional (cloogppl != null) cloogppl) ++ (optionals langTreelang [bison flex]) @@ -185,7 +188,11 @@ 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 langJava then "--with-ecj-jar=${javaEcj}" else ""} + ${if langJava then + "--with-ecj-jar=${javaEcj} " + + "--enable-java-home --with-java-home=\${prefix} " + + "--with-jvm-root-dir=\${prefix}/jdk" + else ""} ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} --with-gmp=${gmp} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f4820cc7d81..011124bc870 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2218,7 +2218,7 @@ let langCC = true; langC = false; profiledCompiler = false; - inherit zip unzip zlib boehmgc gettext pkgconfig; + inherit zip unzip zlib boehmgc gettext pkgconfig perl; inherit (gtkLibs) gtk; inherit (gnome) libart_lgpl; inherit (xlibs) libX11 libXt libSM libICE libXtst libXi libXrender