From 279a94a6373907bc1c66cc7e9bbd895fec4b7c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 20 Jul 2009 15:34:10 +0000 Subject: [PATCH] GCJ 4.4: Pass `ecj.jar' using `--with-ecj-jar'. svn path=/nixpkgs/trunk/; revision=16434 --- pkgs/development/compilers/gcc-4.4/builder.sh | 6 ----- .../development/compilers/gcc-4.4/default.nix | 26 +++++++++---------- 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