Author: shlevy
Date: Sat Apr  2 16:09:09 2011
New Revision: 26669
URL: https://svn.nixos.org/websvn/nix/?rev=26669&sc=1

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

Modified:
   nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh
   nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/default.nix

Modified: nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh
==============================================================================
--- nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh Sat Apr  2 
15:21:36 2011        (r26668)
+++ nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh Sat Apr  2 
16:09:09 2011        (r26669)
@@ -8,7 +8,9 @@
 # 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"

Modified: nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/default.nix        Sat Apr 
 2 15:21:36 2011        (r26668)
+++ nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/default.nix        Sat Apr 
 2 16:09:09 2011        (r26669)
@@ -200,7 +200,7 @@
     else null;
 
   inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
-    libcCross crossMingw;
+    libcCross crossMingw langCC;
 
   buildNativeInputs = [ texinfo which ]
     ++ optional (perl != null) perl;
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to