Use g++ -E as the C++ preprocessor

The problem with gnat46 not building was because gnatboot replaces the stdenv
gcc with the gnat45 gcc, so calling g++ directly as the C++ preprocessor fixes
this.

svn path=/nixpkgs/trunk/; revision=26671
This commit is contained in:
Shea Levy 2011-04-02 19:13:36 +00:00
parent 72a9ea5c5c
commit bec9352ae7
2 changed files with 2 additions and 4 deletions

View File

@ -8,9 +8,7 @@ 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"
if test "$langCC" = "1"; then export CXXCPP="g++ -E"
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 langCC; libcCross crossMingw;
buildNativeInputs = [ texinfo which ] buildNativeInputs = [ texinfo which ]
++ optional (perl != null) perl; ++ optional (perl != null) perl;