summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-07-20 15:34:10 +0000
committerLudovic Courtès <ludo@gnu.org>2009-07-20 15:34:10 +0000
commit279a94a6373907bc1c66cc7e9bbd895fec4b7c3e (patch)
tree7fbd5db885db379e93f4b2eec9cc6da875f4b1b5 /pkgs/development
parent3c7bb6a957b9c02aa0740670d4e643152da74c4c (diff)
downloadnixlib-279a94a6373907bc1c66cc7e9bbd895fec4b7c3e.tar
nixlib-279a94a6373907bc1c66cc7e9bbd895fec4b7c3e.tar.gz
nixlib-279a94a6373907bc1c66cc7e9bbd895fec4b7c3e.tar.bz2
nixlib-279a94a6373907bc1c66cc7e9bbd895fec4b7c3e.tar.lz
nixlib-279a94a6373907bc1c66cc7e9bbd895fec4b7c3e.tar.xz
nixlib-279a94a6373907bc1c66cc7e9bbd895fec4b7c3e.tar.zst
nixlib-279a94a6373907bc1c66cc7e9bbd895fec4b7c3e.zip
GCJ 4.4: Pass `ecj.jar' using `--with-ecj-jar'.
svn path=/nixpkgs/trunk/; revision=16434
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/gcc-4.4/builder.sh6
-rw-r--r--pkgs/development/compilers/gcc-4.4/default.nix26
2 files changed, 12 insertions, 20 deletions
diff --git a/pkgs/development/compilers/gcc-4.4/builder.sh b/pkgs/development/compilers/gcc-4.4/builder.sh
index ec8b32d5307e..dc96adc982df 100644
--- a/pkgs/development/compilers/gcc-4.4/builder.sh
+++ b/pkgs/development/compilers/gcc-4.4/builder.sh
@@ -62,12 +62,6 @@ fi
 
 
 preConfigure() {
-    # Copy `ecj.jar' to `$(top_srcdir)' when available.
-    if [ -f "$javaEcj" ]
-    then
-	cp -v "$javaEcj" "ecj.jar"
-    fi
-
     # Perform the build in a different directory.
     mkdir ../build
     cd ../build
diff --git a/pkgs/development/compilers/gcc-4.4/default.nix b/pkgs/development/compilers/gcc-4.4/default.nix
index f55f62a9fa6e..9ccad2cdeec3 100644
--- a/pkgs/development/compilers/gcc-4.4/default.nix
+++ b/pkgs/development/compilers/gcc-4.4/default.nix
@@ -16,7 +16,17 @@ assert langTreelang -> bison != null && flex != null;
 
 with stdenv.lib;
 
-let version = "4.4.0"; in
+let version = "4.4.0";
+    javaEcj = fetchurl {
+      # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
+      # `configure' time.
+
+      # XXX: Eventually we might want to take it from upstream.
+      url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
+      sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
+    };
+
+in
 
 stdenv.mkDerivation ({
   name = "${name}-${version}";
@@ -53,19 +63,6 @@ stdenv.mkDerivation ({
     ++ optional noSysDirs ./no-sys-dirs.patch
     ++ optional (noSysDirs && langFortran) ./no-sys-dirs-fortran.patch;
 
-  javaEcj =
-    if langJava
-    then fetchurl {
-        # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
-        # `configure' time.
-
-        # XXX: Eventually we might want to take it from upstream.
-        url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
-        sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
-      }
-    else "";
-
-
   inherit noSysDirs profiledCompiler staticCompiler;
 
   buildInputs = [ texinfo gmp mpfr gettext ]
@@ -80,6 +77,7 @@ stdenv.mkDerivation ({
     ${if enableMultilib then "" else "--disable-multilib"}
     ${if ppl != null then "--with-ppl=${ppl}" else ""}
     ${if cloogppl != null then "--with-cloog=${cloogppl}" else ""}
+    ${if langJava then "--with-ecj-jar=${javaEcj}" else ""}
     --disable-libstdcxx-pch
     --without-included-gettext
     --with-system-zlib