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
This commit is contained in:
Ludovic Courtès 2009-07-27 13:50:19 +00:00
parent 8feb395f42
commit 7583ac7638
2 changed files with 23 additions and 10 deletions

View File

@ -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"

View File

@ -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 {}))
})