diff --git a/pkgs/development/compilers/gcc-4.4/builder.sh b/pkgs/development/compilers/gcc-4.4/builder.sh index 423261be319..5f14ae92d1c 100644 --- a/pkgs/development/compilers/gcc-4.4/builder.sh +++ b/pkgs/development/compilers/gcc-4.4/builder.sh @@ -48,8 +48,15 @@ if test "$noSysDirs" = "1"; then 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" + for lib in "$zlib" "$boehmgc" "$libX11" "$libXt" "$libSM" \ + "$libICE" "$libXtst" + do + if test -n "$lib" + then + export CPATH="$CPATH:$lib/include" + export LIBRARY_PATH="$LIBRARY_PATH:$lib/lib" + fi + done fi echo "setting \$CPATH to \`$CPATH'" diff --git a/pkgs/development/compilers/gcc-4.4/default.nix b/pkgs/development/compilers/gcc-4.4/default.nix index 97834cea569..fdb26d71329 100644 --- a/pkgs/development/compilers/gcc-4.4/default.nix +++ b/pkgs/development/compilers/gcc-4.4/default.nix @@ -101,7 +101,8 @@ stdenv.mkDerivation ({ "; inherit gmp mpfr zlib boehmgc; - + inherit libX11 libXt libSM libICE libXtst; + passthru = { inherit langC langCC langFortran langTreelang enableMultilib; }; meta = {