From 72a9ea5c5ca33610d4850cad40d6660e4aae6b8f Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sat, 2 Apr 2011 16:09:09 +0000 Subject: [PATCH] Only set the C++ preprocessor if C++ is enabled svn path=/nixpkgs/trunk/; revision=26669 --- pkgs/development/compilers/gcc-4.6/builder.sh | 4 +++- pkgs/development/compilers/gcc-4.6/default.nix | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc-4.6/builder.sh b/pkgs/development/compilers/gcc-4.6/builder.sh index 57a204d18877..0a18a81ac89f 100644 --- a/pkgs/development/compilers/gcc-4.6/builder.sh +++ b/pkgs/development/compilers/gcc-4.6/builder.sh @@ -8,7 +8,9 @@ mkdir $NIX_FIXINC_DUMMY # libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad # Thing. 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 EXTRA_LDFLAGS="-static" diff --git a/pkgs/development/compilers/gcc-4.6/default.nix b/pkgs/development/compilers/gcc-4.6/default.nix index 827540b9cab0..bfa54f6e0d73 100644 --- a/pkgs/development/compilers/gcc-4.6/default.nix +++ b/pkgs/development/compilers/gcc-4.6/default.nix @@ -200,7 +200,7 @@ stdenv.mkDerivation ({ else null; inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic - libcCross crossMingw; + libcCross crossMingw langCC; buildNativeInputs = [ texinfo which ] ++ optional (perl != null) perl;