diff options
Diffstat (limited to 'pkgs/development/compilers/gcc-4.4')
-rw-r--r-- | pkgs/development/compilers/gcc-4.4/builder.sh | 9 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc-4.4/default.nix | 24 |
2 files changed, 23 insertions, 10 deletions
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 {})) +}) |