Only set the C++ preprocessor if C++ is enabled

svn path=/nixpkgs/trunk/; revision=26669
This commit is contained in:
Shea Levy 2011-04-02 16:09:09 +00:00
parent ea7a559290
commit 72a9ea5c5c
2 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,9 @@ mkdir $NIX_FIXINC_DUMMY
# libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad # libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad
# Thing. # Thing.
export CPP="gcc -E" export CPP="gcc -E"
export CXXCPP="gcc -E" if test "$langCC" = "1"; then
export CXXCPP="gcc -E" #We only want this if C++ is enabled
fi
if test "$staticCompiler" = "1"; then if test "$staticCompiler" = "1"; then
EXTRA_LDFLAGS="-static" EXTRA_LDFLAGS="-static"

View File

@ -200,7 +200,7 @@ stdenv.mkDerivation ({
else null; else null;
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
libcCross crossMingw; libcCross crossMingw langCC;
buildNativeInputs = [ texinfo which ] buildNativeInputs = [ texinfo which ]
++ optional (perl != null) perl; ++ optional (perl != null) perl;