From 7583ac76385a150e3d97fa4c0b70a0bd80d4a93d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 27 Jul 2009 13:50:19 +0000 Subject: GCJ 4.4: Don't build the `configure-gcc' target; use FastJar; make zlib/BDW-GC visible. Building the `configure-gcc' target early on (in `preConfigure') was a big mistake as the build woud just go haywire after that (e.g., trying and failing to build `jvgenmain' in stage 1). svn path=/nixpkgs/trunk/; revision=16472 --- pkgs/development/compilers/gcc-4.4/builder.sh | 9 +++++++++ pkgs/development/compilers/gcc-4.4/default.nix | 24 ++++++++++++++---------- 2 files changed, 23 insertions(+), 10 deletions(-) (limited to 'pkgs/development/compilers/gcc-4.4') diff --git a/pkgs/development/compilers/gcc-4.4/builder.sh b/pkgs/development/compilers/gcc-4.4/builder.sh index b3436e447dcd..423261be3199 100644 --- a/pkgs/development/compilers/gcc-4.4/builder.sh +++ b/pkgs/development/compilers/gcc-4.4/builder.sh @@ -47,6 +47,15 @@ if test "$noSysDirs" = "1"; then # Likewise, to help it find `crti.o' and similar files. export LIBRARY_PATH="$glibc_libdir" + if test "$langJava" = "1"; then + export CPATH="$CPATH:$zlib/include:$boehmgc/include" + export LIBRARY_PATH="$LIBRARY_PATH:$zlib/lib:$boehmgc/lib" + fi + + echo "setting \$CPATH to \`$CPATH'" + echo "setting \$LIBRARY_PATH to \`$LIBRARY_PATH'" + + extraCFlags="-g0 $extraCFlags" extraLDFlags="--strip-debug $extraLDFlags" diff --git a/pkgs/development/compilers/gcc-4.4/default.nix b/pkgs/development/compilers/gcc-4.4/default.nix index 4624af92957e..52d3db5c4539 100644 --- a/pkgs/development/compilers/gcc-4.4/default.nix +++ b/pkgs/development/compilers/gcc-4.4/default.nix @@ -31,7 +31,17 @@ in stdenv.mkDerivation ({ name = "${name}-${version}"; - + + preConfigure = + if langJava + then '' + # Make sure a `jar' executable is in the search path. + ensureDir "bin" + ln -sv "${fastjar}/bin/fastjar" "bin/jar" + export PATH="$PWD/bin:$PATH" + '' + else ""; + builder = ./builder.sh; src = @@ -60,7 +70,7 @@ stdenv.mkDerivation ({ [./pass-cxxcpp.patch] ++ optional noSysDirs ./no-sys-dirs.patch; - inherit noSysDirs profiledCompiler staticCompiler; + inherit noSysDirs profiledCompiler staticCompiler langJava; buildInputs = [ texinfo gmp mpfr gettext ] ++ (optional (ppl != null) ppl) @@ -92,7 +102,7 @@ stdenv.mkDerivation ({ ${if stdenv.isi686 then "--with-arch=i686" else ""} "; - inherit gmp mpfr; + inherit gmp mpfr zlib boehmgc; passthru = { inherit langC langCC langFortran langTreelang enableMultilib; }; @@ -106,10 +116,4 @@ stdenv.mkDerivation ({ stdenv.lib.maintainers.ludo ]; }; -} // (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 {})) +}) -- cgit 1.4.1