summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/arduino/arduino-core/default.nix4
-rw-r--r--pkgs/development/compilers/aldor/default.nix2
-rw-r--r--pkgs/development/compilers/bigloo/default.nix2
-rw-r--r--pkgs/development/compilers/cmucl/binary.nix2
-rw-r--r--pkgs/development/compilers/compcert/default.nix7
-rw-r--r--pkgs/development/compilers/cryptol/1.8.x.nix10
-rw-r--r--pkgs/development/compilers/cudatoolkit/5.5.nix6
-rw-r--r--pkgs/development/compilers/cudatoolkit/6.0.nix6
-rw-r--r--pkgs/development/compilers/fpc/lazarus.nix2
-rw-r--r--pkgs/development/compilers/gcc/3.4/builder.sh8
-rw-r--r--pkgs/development/compilers/gcc/4.2-apple64/builder.sh6
-rw-r--r--pkgs/development/compilers/gcc/4.3/builder.sh8
-rw-r--r--pkgs/development/compilers/gcc/4.4/builder.sh22
-rw-r--r--pkgs/development/compilers/gcc/4.4/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/4.5/builder.sh24
-rw-r--r--pkgs/development/compilers/gcc/4.5/default.nix6
-rw-r--r--pkgs/development/compilers/gcc/4.6/builder.sh26
-rw-r--r--pkgs/development/compilers/gcc/4.6/default.nix6
-rw-r--r--pkgs/development/compilers/gcc/4.8/builder.sh26
-rw-r--r--pkgs/development/compilers/gcc/4.8/default.nix6
-rw-r--r--pkgs/development/compilers/gcc/4.9/builder.sh26
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix6
-rw-r--r--pkgs/development/compilers/gcl/default.nix12
-rw-r--r--pkgs/development/compilers/ghc/6.10.1-binary.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.10.1.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.10.2-binary.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.10.2.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.10.3.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.10.4.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.11.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.12.1-binary.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.12.1.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.12.2.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.12.3.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.4.2-binary.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.4.2.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.8.2.nix2
-rw-r--r--pkgs/development/compilers/ghc/6.8.3.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.0.1.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.0.2.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.0.3.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.0.4-binary.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.0.4.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.2.1.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.2.2.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.4.1.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.4.2-binary.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.4.2.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.6.1.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.6.2.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.6.3.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.8.3-binary.nix2
-rw-r--r--pkgs/development/compilers/ghc/head.nix2
-rw-r--r--pkgs/development/compilers/gnatboot/default.nix4
-rw-r--r--pkgs/development/compilers/go/1.3.nix10
-rw-r--r--pkgs/development/compilers/idris/wrapper.nix4
-rw-r--r--pkgs/development/compilers/julia/0.2.1.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.3/clang.nix10
-rw-r--r--pkgs/development/compilers/llvm/3.4/clang.nix10
-rw-r--r--pkgs/development/compilers/mentor/default.nix2
-rw-r--r--pkgs/development/compilers/mozart/builder.sh2
-rw-r--r--pkgs/development/compilers/opendylan/bin.nix2
-rw-r--r--pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh4
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk-linux-base.nix6
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk6-linux.nix2
-rw-r--r--pkgs/development/compilers/path64/default.nix4
-rw-r--r--pkgs/development/compilers/rustc/0.12.nix13
-rw-r--r--pkgs/development/compilers/rustc/head.nix13
-rw-r--r--pkgs/development/compilers/sbcl/1.2.0.nix3
-rw-r--r--pkgs/development/compilers/sbcl/default.nix3
-rw-r--r--pkgs/development/compilers/tinycc/default.nix2
-rw-r--r--pkgs/development/compilers/urweb/default.nix4
-rw-r--r--pkgs/development/guile-modules/guile-lib/default.nix4
-rw-r--r--pkgs/development/interpreters/dart/default.nix4
-rw-r--r--pkgs/development/interpreters/luajit/default.nix6
-rw-r--r--pkgs/development/interpreters/perl/5.16/default.nix4
-rw-r--r--pkgs/development/interpreters/perl/5.20/default.nix6
-rw-r--r--pkgs/development/interpreters/pypy/2.4/default.nix4
-rw-r--r--pkgs/development/interpreters/python/2.6/default.nix2
-rw-r--r--pkgs/development/interpreters/python/2.7/default.nix2
-rw-r--r--pkgs/development/interpreters/xulrunner/default.nix2
-rw-r--r--pkgs/development/libraries/botan/generic.nix4
-rw-r--r--pkgs/development/libraries/fmod/default.nix2
-rw-r--r--pkgs/development/libraries/gettext/default.nix4
-rw-r--r--pkgs/development/libraries/glib/default.nix4
-rw-r--r--pkgs/development/libraries/glibc/common.nix4
-rw-r--r--pkgs/development/libraries/glibc/default.nix6
-rw-r--r--pkgs/development/libraries/haskell/cuda/default.nix2
-rw-r--r--pkgs/development/libraries/libedit/default.nix2
-rw-r--r--pkgs/development/libraries/libopensc-dnie/default.nix2
-rw-r--r--pkgs/development/libraries/libre/default.nix4
-rw-r--r--pkgs/development/libraries/librem/default.nix4
-rw-r--r--pkgs/development/libraries/libvncserver/default.nix2
-rw-r--r--pkgs/development/libraries/pdf2xml/default.nix2
-rw-r--r--pkgs/development/libraries/podofo/default.nix4
-rw-r--r--pkgs/development/libraries/qt-4.x/4.8/default.nix4
-rw-r--r--pkgs/development/libraries/scmccid/default.nix4
-rw-r--r--pkgs/development/libraries/serf/default.nix2
-rw-r--r--pkgs/development/libraries/strigi/default.nix2
-rw-r--r--pkgs/development/libraries/v8/default.nix4
-rw-r--r--pkgs/development/libraries/wtk/builder.sh2
-rw-r--r--pkgs/development/libraries/wtk/default.nix2
-rw-r--r--pkgs/development/misc/amdapp-sdk/default.nix8
-rw-r--r--pkgs/development/mobile/androidenv/androidndk.nix2
-rw-r--r--pkgs/development/mobile/androidenv/androidsdk.nix12
-rw-r--r--pkgs/development/mobile/flashtool/default.nix2
-rw-r--r--pkgs/development/mobile/titaniumenv/titaniumsdk-3.1.nix4
-rw-r--r--pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix4
-rw-r--r--pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix4
-rw-r--r--pkgs/development/mobile/titaniumenv/titaniumsdk-3.4.nix4
-rw-r--r--pkgs/development/tools/atom-shell/default.nix2
-rw-r--r--pkgs/development/tools/build-managers/cargo/common.nix4
-rw-r--r--pkgs/development/tools/cdecl/default.nix2
-rw-r--r--pkgs/development/tools/misc/cflow/default.nix2
-rw-r--r--pkgs/development/tools/misc/saleae-logic/default.nix4
-rw-r--r--pkgs/development/tools/node-webkit/default.nix6
-rw-r--r--pkgs/development/tools/phantomjs/default.nix4
-rw-r--r--pkgs/development/tools/selenium/chromedriver/default.nix2
-rw-r--r--pkgs/development/tools/selenium/server/default.nix2
119 files changed, 280 insertions, 273 deletions
diff --git a/pkgs/development/arduino/arduino-core/default.nix b/pkgs/development/arduino/arduino-core/default.nix
index 3f722d1b7d45..a5b8980e32cf 100644
--- a/pkgs/development/arduino/arduino-core/default.nix
+++ b/pkgs/development/arduino/arduino-core/default.nix
@@ -36,8 +36,8 @@ stdenv.mkDerivation rec {
             if echo "$filepath" | grep -q "\.elf$"; then
                 continue
             fi
-            echo "setting interpreter $(cat "$NIX_GCC"/nix-support/dynamic-linker) in $filepath"
-            patchelf --set-interpreter "$(cat "$NIX_GCC"/nix-support/dynamic-linker)" "$filepath"
+            echo "setting interpreter $(cat "$NIX_CC"/nix-support/dynamic-linker) in $filepath"
+            patchelf --set-interpreter "$(cat "$NIX_CC"/nix-support/dynamic-linker)" "$filepath"
             test $? -eq 0 || { echo "patchelf failed to process $filepath"; exit 1; }
         fi
     done
diff --git a/pkgs/development/compilers/aldor/default.nix b/pkgs/development/compilers/aldor/default.nix
index ddf16bc2219e..b1809c9a6d9d 100644
--- a/pkgs/development/compilers/aldor/default.nix
+++ b/pkgs/development/compilers/aldor/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
     do
       wrapProgram $out/bin/$prog --set ALDORROOT $out \
         --prefix PATH : ${openjdk}/bin \
-        --prefix PATH : ${stdenv.gcc}/bin ;
+        --prefix PATH : ${stdenv.cc}/bin ;
     done
   '';
 
diff --git a/pkgs/development/compilers/bigloo/default.nix b/pkgs/development/compilers/bigloo/default.nix
index 3ac5f1696ce8..5c227d72e34f 100644
--- a/pkgs/development/compilers/bigloo/default.nix
+++ b/pkgs/development/compilers/bigloo/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
 
   preConfigure =
     # Help libgc's configure.
-    '' export CXXCPP="g++ -E"
+    '' export CXXCPP="$CXX -E"
     '';
 
   patchPhase = ''
diff --git a/pkgs/development/compilers/cmucl/binary.nix b/pkgs/development/compilers/cmucl/binary.nix
index c3a960388bb4..027857ccda0b 100644
--- a/pkgs/development/compilers/cmucl/binary.nix
+++ b/pkgs/development/compilers/cmucl/binary.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
   buildCommand = ''
     mkdir -p $out
     tar -C $out -xjf ${dist}
-    patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
       $out/bin/lisp
   '';
 
diff --git a/pkgs/development/compilers/compcert/default.nix b/pkgs/development/compilers/compcert/default.nix
index bdf850df8cb2..00a0e7b9c2be 100644
--- a/pkgs/development/compilers/compcert/default.nix
+++ b/pkgs/development/compilers/compcert/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, coq, ocaml, ocamlPackages, gcc }:
+{ stdenv, fetchurl, coq, ocaml, ocamlPackages }:
 
 stdenv.mkDerivation rec {
   name    = "compcert-${version}";
@@ -12,7 +12,10 @@ stdenv.mkDerivation rec {
   buildInputs = [ coq ocaml ocamlPackages.menhir ];
 
   enableParallelBuilding = true;
-  configurePhase = "./configure -prefix $out -toolprefix ${gcc}/bin/ " +
+
+  configurePhase = ''
+    substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
+    ./configure -prefix $out -toolprefix ${stdenv.cc}/bin/ '' +
     (if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/compilers/cryptol/1.8.x.nix b/pkgs/development/compilers/cryptol/1.8.x.nix
index 17382ed9d567..e6f04249f53a 100644
--- a/pkgs/development/compilers/cryptol/1.8.x.nix
+++ b/pkgs/development/compilers/cryptol/1.8.x.nix
@@ -10,12 +10,12 @@ let
   jss-ver = "jss-0.4";
 
   libPath = stdenv.lib.makeLibraryPath
-    [ stdenv.gcc.libc
-      stdenv.gcc.gcc
+    [ stdenv.cc.libc
+      stdenv.cc.gcc
       gmp4
       ncurses
       zlib
-    ] + ":${stdenv.gcc.gcc}/lib64";
+    ] + ":${stdenv.cc.gcc}/lib64";
 
   cryptol-bin =
     if stdenv.system == "i686-linux"
@@ -94,12 +94,12 @@ stdenv.mkDerivation rec {
 
     # Hack around lack of libtinfo in NixOS
     ln -s ${ncurses}/lib/libncursesw.so.5.9 $out/lib/libtinfo.so.5
-    ln -s ${stdenv.gcc.libc}/lib/libpthread-2.19.so $out/lib/libpthread.so.0
+    ln -s ${stdenv.cc.libc}/lib/libpthread-2.19.so $out/lib/libpthread.so.0
   '';
 
   fixupPhase = ''
     for x in bin/cryptol bin/edif2verilog bin/copy-iverilog bin/symbolic_netlist bin/jaig bin/vvp-galois bin/lss libexec/jss; do
-      patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+      patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
         --set-rpath "$out/lib:${libPath}" $out/$x
       patchelf --shrink-rpath $out/$x
     done
diff --git a/pkgs/development/compilers/cudatoolkit/5.5.nix b/pkgs/development/compilers/cudatoolkit/5.5.nix
index bf4009f08be3..a16a252b4a56 100644
--- a/pkgs/development/compilers/cudatoolkit/5.5.nix
+++ b/pkgs/development/compilers/cudatoolkit/5.5.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     gtk2 glib fontconfig freetype unixODBC alsaLib
   ];
 
-  rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.gcc.gcc}/lib64";
+  rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64";
 
   unpackPhase = ''
     sh $src --keep --noexec
@@ -38,10 +38,10 @@ stdenv.mkDerivation rec {
 
   buildPhase = ''
     find . -type f -executable -exec patchelf \
-      --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
       '{}' \; || true
     find . -type f -exec patchelf \
-      --set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
+      --set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
       --force-rpath \
       '{}' \; || true
   '';
diff --git a/pkgs/development/compilers/cudatoolkit/6.0.nix b/pkgs/development/compilers/cudatoolkit/6.0.nix
index 5da4b3d0a4aa..d6fdb6c6bdb0 100644
--- a/pkgs/development/compilers/cudatoolkit/6.0.nix
+++ b/pkgs/development/compilers/cudatoolkit/6.0.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     gtk2 glib fontconfig freetype unixODBC alsaLib
   ];
 
-  rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.gcc.gcc}/lib64";
+  rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64";
 
   unpackPhase = ''
     sh $src --keep --noexec
@@ -38,10 +38,10 @@ stdenv.mkDerivation rec {
 
   buildPhase = ''
     find . -type f -executable -exec patchelf \
-      --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
       '{}' \; || true
     find . -type f -exec patchelf \
-      --set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
+      --set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
       --force-rpath \
       '{}' \; || true
   '';
diff --git a/pkgs/development/compilers/fpc/lazarus.nix b/pkgs/development/compilers/fpc/lazarus.nix
index bf2e10b2c629..ef3d962d7d18 100644
--- a/pkgs/development/compilers/fpc/lazarus.nix
+++ b/pkgs/development/compilers/fpc/lazarus.nix
@@ -17,7 +17,7 @@ let
   buildInputs = [
     fpc gtk glib libXi inputproto
     libX11 xproto libXext xextproto pango atk
-    stdenv.gcc makeWrapper gdk_pixbuf
+    stdenv.cc makeWrapper gdk_pixbuf
   ];
 in
 stdenv.mkDerivation {
diff --git a/pkgs/development/compilers/gcc/3.4/builder.sh b/pkgs/development/compilers/gcc/3.4/builder.sh
index 5a43d600a503..3909b605c208 100644
--- a/pkgs/development/compilers/gcc/3.4/builder.sh
+++ b/pkgs/development/compilers/gcc/3.4/builder.sh
@@ -7,17 +7,17 @@ mkdir $NIX_FIXINC_DUMMY
 
 if test "$noSysDirs" = "1"; then
 
-    if test -e $NIX_GCC/nix-support/orig-libc; then
+    if test -e $NIX_CC/nix-support/orig-libc; then
 
         # Figure out what extra flags to pass to the gcc compilers
         # being generated to make sure that they use our glibc.
-        extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
-        extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
+        extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
+        extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
 
         # Use *real* header files, otherwise a limits.h is generated
         # that does not include Glibc's limits.h (notably missing
         # SSIZE_MAX, which breaks the build).
-        export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
+        export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
         
     else
         # Hack: support impure environments.
diff --git a/pkgs/development/compilers/gcc/4.2-apple64/builder.sh b/pkgs/development/compilers/gcc/4.2-apple64/builder.sh
index 036678460d60..4a4fb476a358 100644
--- a/pkgs/development/compilers/gcc/4.2-apple64/builder.sh
+++ b/pkgs/development/compilers/gcc/4.2-apple64/builder.sh
@@ -14,11 +14,11 @@ if test "$noSysDirs" = "1"; then
 
     # Figure out what extra flags to pass to the gcc compilers being
     # generated to make sure that they use our glibc.
-    if test -e $NIX_GCC/nix-support/orig-glibc; then
-        glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
+    if test -e $NIX_CC/nix-support/orig-glibc; then
+        glibc=$(cat $NIX_CC/nix-support/orig-glibc)
 
         # Ugh.  Copied from gcc-wrapper/builder.sh.  We can't just
-        # source in $NIX_GCC/nix-support/add-flags, since that would
+        # source in $NIX_CC/nix-support/add-flags, since that would
         # cause *this* GCC to be linked against the *previous* GCC.
         # Need some more modularity there.
         extraCFlags="-B$glibc/lib -isystem $glibc/include"
diff --git a/pkgs/development/compilers/gcc/4.3/builder.sh b/pkgs/development/compilers/gcc/4.3/builder.sh
index aaf0c54d99bf..16e53d9f2313 100644
--- a/pkgs/development/compilers/gcc/4.3/builder.sh
+++ b/pkgs/development/compilers/gcc/4.3/builder.sh
@@ -12,17 +12,17 @@ export CPP="gcc -E"
 
 if test "$noSysDirs" = "1"; then
 
-    if test -e $NIX_GCC/nix-support/orig-libc; then
+    if test -e $NIX_CC/nix-support/orig-libc; then
 
         # Figure out what extra flags to pass to the gcc compilers
         # being generated to make sure that they use our glibc.
-        extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
-        extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
+        extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
+        extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
 
         # Use *real* header files, otherwise a limits.h is generated
         # that does not include Glibc's limits.h (notably missing
         # SSIZE_MAX, which breaks the build).
-        export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
+        export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
         
     else
         # Hack: support impure environments.
diff --git a/pkgs/development/compilers/gcc/4.4/builder.sh b/pkgs/development/compilers/gcc/4.4/builder.sh
index abe14b457ab2..15476131e03d 100644
--- a/pkgs/development/compilers/gcc/4.4/builder.sh
+++ b/pkgs/development/compilers/gcc/4.4/builder.sh
@@ -17,20 +17,20 @@ fi
 
 if test "$noSysDirs" = "1"; then
 
-    if test -e $NIX_GCC/nix-support/orig-libc; then
+    if test -e $NIX_CC/nix-support/orig-libc; then
 
         # Figure out what extra flags to pass to the gcc compilers
         # being generated to make sure that they use our glibc.
-        extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
-        extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
+        extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
+        extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
 
         # Use *real* header files, otherwise a limits.h is generated
         # that does not include Glibc's limits.h (notably missing
         # SSIZE_MAX, which breaks the build).
-        export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
+        export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
 
         # The path to the Glibc binaries such as `crti.o'.
-        glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
+        glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
         
     else
         # Hack: support impure environments.
@@ -61,27 +61,27 @@ if test "$noSysDirs" = "1"; then
             EXTRA_LDFLAGS_TARGET="-Wl,-L${libcCross}/lib"
         fi
     else
-        if test -z "$NIX_GCC_CROSS"; then
+        if test -z "$NIX_CC_CROSS"; then
             EXTRA_FLAGS_TARGET="$EXTRA_FLAGS"
             EXTRA_LDFLAGS_TARGET="$EXTRA_LDFLAGS"
         else
             # This the case of cross-building the gcc.
             # We need special flags for the target, different than those of the build
             # Assertion:
-            test -e $NIX_GCC_CROSS/nix-support/orig-libc
+            test -e $NIX_CC_CROSS/nix-support/orig-libc
 
             # Figure out what extra flags to pass to the gcc compilers
             # being generated to make sure that they use our glibc.
-            extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
-            extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
+            extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
+            extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
 
             # Use *real* header files, otherwise a limits.h is generated
             # that does not include Glibc's limits.h (notably missing
             # SSIZE_MAX, which breaks the build).
-            NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
+            NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
 
             # The path to the Glibc binaries such as `crti.o'.
-            glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
+            glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
 
             extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
             extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
diff --git a/pkgs/development/compilers/gcc/4.4/default.nix b/pkgs/development/compilers/gcc/4.4/default.nix
index be2f323fde1c..3cbd7706ea0d 100644
--- a/pkgs/development/compilers/gcc/4.4/default.nix
+++ b/pkgs/development/compilers/gcc/4.4/default.nix
@@ -188,7 +188,7 @@ stdenv.mkDerivation ({
     NM_FOR_TARGET = "${stdenv.cross.config}-nm";
     CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
     # If we are making a cross compiler, cross != null
-    NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
+    NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
     configureFlags = "
       ${if enableMultilib then "" else "--disable-multilib"}
       ${if enableShared then "" else "--disable-shared"}
diff --git a/pkgs/development/compilers/gcc/4.5/builder.sh b/pkgs/development/compilers/gcc/4.5/builder.sh
index e1e56c8574ac..83ca368c4ff0 100644
--- a/pkgs/development/compilers/gcc/4.5/builder.sh
+++ b/pkgs/development/compilers/gcc/4.5/builder.sh
@@ -23,20 +23,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
 
 if test "$noSysDirs" = "1"; then
 
-    if test -e $NIX_GCC/nix-support/orig-libc; then
+    if test -e $NIX_CC/nix-support/orig-libc; then
 
         # Figure out what extra flags to pass to the gcc compilers
         # being generated to make sure that they use our glibc.
-        extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
-        extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
+        extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
+        extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
 
         # Use *real* header files, otherwise a limits.h is generated
         # that does not include Glibc's limits.h (notably missing
         # SSIZE_MAX, which breaks the build).
-        export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
+        export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
 
         # The path to the Glibc binaries such as `crti.o'.
-        glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
+        glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
         
     else
         # Hack: support impure environments.
@@ -67,27 +67,27 @@ if test "$noSysDirs" = "1"; then
             EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
         fi
     else
-        if test -z "$NIX_GCC_CROSS"; then
+        if test -z "$NIX_CC_CROSS"; then
             EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
             EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
         else
             # This the case of cross-building the gcc.
             # We need special flags for the target, different than those of the build
             # Assertion:
-            test -e $NIX_GCC_CROSS/nix-support/orig-libc
+            test -e $NIX_CC_CROSS/nix-support/orig-libc
 
             # Figure out what extra flags to pass to the gcc compilers
             # being generated to make sure that they use our glibc.
-            extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
-            extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
+            extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
+            extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
 
             # Use *real* header files, otherwise a limits.h is generated
             # that does not include Glibc's limits.h (notably missing
             # SSIZE_MAX, which breaks the build).
-            NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
+            NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
 
             # The path to the Glibc binaries such as `crti.o'.
-            glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
+            glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
 
             extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
             extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
@@ -162,7 +162,7 @@ preConfigure() {
     # Patch the configure script so it finds glibc headers
     # It's important for example in order not to get libssp built, because it's
     # functionality is in glibc already.
-    glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
+    glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
     sed -i \
       -e s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers, \
       gcc/configure
diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix
index fbeea0768ad3..95986c03f747 100644
--- a/pkgs/development/compilers/gcc/4.5/default.nix
+++ b/pkgs/development/compilers/gcc/4.5/default.nix
@@ -185,11 +185,11 @@ stdenv.mkDerivation ({
            sed -i gcc/config/t-gnu \
                -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
         ''
-    else if cross != null || stdenv.gcc.libc != null then
+    else if cross != null || stdenv.cc.libc != null then
       # On NixOS, use the right path to the dynamic linker instead of
       # `/lib/ld*.so'.
       let
-        libc = if libcCross != null then libcCross else stdenv.gcc.libc;
+        libc = if libcCross != null then libcCross else stdenv.cc.libc;
       in
         '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
            for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
@@ -272,7 +272,7 @@ stdenv.mkDerivation ({
     NM_FOR_TARGET = "${stdenv.cross.config}-nm";
     CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
     # If we are making a cross compiler, cross != null
-    NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
+    NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
     dontStrip = true;
     configureFlags = ''
       ${if enableMultilib then "" else "--disable-multilib"}
diff --git a/pkgs/development/compilers/gcc/4.6/builder.sh b/pkgs/development/compilers/gcc/4.6/builder.sh
index de4566c12ddf..af2e97b1e4e5 100644
--- a/pkgs/development/compilers/gcc/4.6/builder.sh
+++ b/pkgs/development/compilers/gcc/4.6/builder.sh
@@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
 
 if test "$noSysDirs" = "1"; then
 
-    if test -e $NIX_GCC/nix-support/orig-libc; then
+    if test -e $NIX_CC/nix-support/orig-libc; then
 
         # Figure out what extra flags to pass to the gcc compilers
         # being generated to make sure that they use our glibc.
-        extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
-        extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
+        extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
+        extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
 
         # Use *real* header files, otherwise a limits.h is generated
         # that does not include Glibc's limits.h (notably missing
         # SSIZE_MAX, which breaks the build).
-        export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
+        export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
 
         # The path to the Glibc binaries such as `crti.o'.
-        glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
+        glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
 
     else
         # Hack: support impure environments.
@@ -74,27 +74,27 @@ if test "$noSysDirs" = "1"; then
             EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
         fi
     else
-        if test -z "$NIX_GCC_CROSS"; then
+        if test -z "$NIX_CC_CROSS"; then
             EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
             EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
         else
             # This the case of cross-building the gcc.
             # We need special flags for the target, different than those of the build
             # Assertion:
-            test -e $NIX_GCC_CROSS/nix-support/orig-libc
+            test -e $NIX_CC_CROSS/nix-support/orig-libc
 
             # Figure out what extra flags to pass to the gcc compilers
             # being generated to make sure that they use our glibc.
-            extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
-            extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
+            extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
+            extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
 
             # Use *real* header files, otherwise a limits.h is generated
             # that does not include Glibc's limits.h (notably missing
             # SSIZE_MAX, which breaks the build).
-            NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
+            NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
 
             # The path to the Glibc binaries such as `crti.o'.
-            glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
+            glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
 
             extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
             extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
@@ -166,11 +166,11 @@ preConfigure() {
         rm -Rf zlib
     fi
 
-    if test -f "$NIX_GCC/nix-support/orig-libc"; then
+    if test -f "$NIX_CC/nix-support/orig-libc"; then
         # Patch the configure script so it finds glibc headers.  It's
         # important for example in order not to get libssp built,
         # because its functionality is in glibc already.
-        glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
+        glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
         sed -i \
             -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
             gcc/configure
diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix
index feca5137f6d3..5ad087db134c 100644
--- a/pkgs/development/compilers/gcc/4.6/default.nix
+++ b/pkgs/development/compilers/gcc/4.6/default.nix
@@ -229,11 +229,11 @@ stdenv.mkDerivation ({
            sed -i gcc/config/t-gnu \
                -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
         ''
-    else if cross != null || stdenv.gcc.libc != null then
+    else if cross != null || stdenv.cc.libc != null then
       # On NixOS, use the right path to the dynamic linker instead of
       # `/lib/ld*.so'.
       let
-        libc = if libcCross != null then libcCross else stdenv.gcc.libc;
+        libc = if libcCross != null then libcCross else stdenv.cc.libc;
       in
         '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
            for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
@@ -339,7 +339,7 @@ stdenv.mkDerivation ({
     NM_FOR_TARGET = "${stdenv.cross.config}-nm";
     CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
     # If we are making a cross compiler, cross != null
-    NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
+    NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
     dontStrip = true;
     configureFlags = ''
       ${if enableMultilib then "" else "--disable-multilib"}
diff --git a/pkgs/development/compilers/gcc/4.8/builder.sh b/pkgs/development/compilers/gcc/4.8/builder.sh
index 3d24d34a2f26..dd77c67a023e 100644
--- a/pkgs/development/compilers/gcc/4.8/builder.sh
+++ b/pkgs/development/compilers/gcc/4.8/builder.sh
@@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
 
 if test "$noSysDirs" = "1"; then
 
-    if test -e $NIX_GCC/nix-support/orig-libc; then
+    if test -e $NIX_CC/nix-support/orig-libc; then
 
         # Figure out what extra flags to pass to the gcc compilers
         # being generated to make sure that they use our glibc.
-        extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
-        extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
+        extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
+        extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
 
         # Use *real* header files, otherwise a limits.h is generated
         # that does not include Glibc's limits.h (notably missing
         # SSIZE_MAX, which breaks the build).
-        export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
+        export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
 
         # The path to the Glibc binaries such as `crti.o'.
-        glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
+        glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
 
     else
         # Hack: support impure environments.
@@ -74,7 +74,7 @@ if test "$noSysDirs" = "1"; then
             EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
         fi
     else
-        if test -z "$NIX_GCC_CROSS"; then
+        if test -z "$NIX_CC_CROSS"; then
             EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
             EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
             EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
@@ -82,20 +82,20 @@ if test "$noSysDirs" = "1"; then
             # This the case of cross-building the gcc.
             # We need special flags for the target, different than those of the build
             # Assertion:
-            test -e $NIX_GCC_CROSS/nix-support/orig-libc
+            test -e $NIX_CC_CROSS/nix-support/orig-libc
 
             # Figure out what extra flags to pass to the gcc compilers
             # being generated to make sure that they use our glibc.
-            extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
-            extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
+            extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
+            extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
 
             # Use *real* header files, otherwise a limits.h is generated
             # that does not include Glibc's limits.h (notably missing
             # SSIZE_MAX, which breaks the build).
-            NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
+            NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
 
             # The path to the Glibc binaries such as `crti.o'.
-            glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
+            glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
             glibc_libdir="$glibc_dir/lib"
             configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
 
@@ -167,11 +167,11 @@ preConfigure() {
         rm -Rf zlib
     fi
 
-    if test -f "$NIX_GCC/nix-support/orig-libc"; then
+    if test -f "$NIX_CC/nix-support/orig-libc"; then
         # Patch the configure script so it finds glibc headers.  It's
         # important for example in order not to get libssp built,
         # because its functionality is in glibc already.
-        glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
+        glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
         sed -i \
             -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
             gcc/configure
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix
index 6547d9b12b6c..e58dea03a765 100644
--- a/pkgs/development/compilers/gcc/4.8/default.nix
+++ b/pkgs/development/compilers/gcc/4.8/default.nix
@@ -251,11 +251,11 @@ stdenv.mkDerivation ({
            sed -i "${gnu_h}" \
                -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
         ''
-    else if cross != null || stdenv.gcc.libc != null then
+    else if cross != null || stdenv.cc.libc != null then
       # On NixOS, use the right path to the dynamic linker instead of
       # `/lib/ld*.so'.
       let
-        libc = if libcCross != null then libcCross else stdenv.gcc.libc;
+        libc = if libcCross != null then libcCross else stdenv.cc.libc;
       in
         '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
            for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
@@ -397,7 +397,7 @@ stdenv.mkDerivation ({
     NM_FOR_TARGET = "${stdenv.cross.config}-nm";
     CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
     # If we are making a cross compiler, cross != null
-    NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
+    NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
     dontStrip = true;
     configureFlags = ''
       ${if enableMultilib then "" else "--disable-multilib"}
diff --git a/pkgs/development/compilers/gcc/4.9/builder.sh b/pkgs/development/compilers/gcc/4.9/builder.sh
index b781fa6c7ef6..96bbd025ba63 100644
--- a/pkgs/development/compilers/gcc/4.9/builder.sh
+++ b/pkgs/development/compilers/gcc/4.9/builder.sh
@@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
 
 if test "$noSysDirs" = "1"; then
 
-    if test -e $NIX_GCC/nix-support/orig-libc; then
+    if test -e $NIX_CC/nix-support/orig-libc; then
 
         # Figure out what extra flags to pass to the gcc compilers
         # being generated to make sure that they use our glibc.
-        extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
-        extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
+        extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
+        extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
 
         # Use *real* header files, otherwise a limits.h is generated
         # that does not include Glibc's limits.h (notably missing
         # SSIZE_MAX, which breaks the build).
-        export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
+        export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
 
         # The path to the Glibc binaries such as `crti.o'.
-        glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
+        glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
 
     else
         # Hack: support impure environments.
@@ -74,7 +74,7 @@ if test "$noSysDirs" = "1"; then
             EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
         fi
     else
-        if test -z "$NIX_GCC_CROSS"; then
+        if test -z "$NIX_CC_CROSS"; then
             EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
             EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
             EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
@@ -82,20 +82,20 @@ if test "$noSysDirs" = "1"; then
             # This the case of cross-building the gcc.
             # We need special flags for the target, different than those of the build
             # Assertion:
-            test -e $NIX_GCC_CROSS/nix-support/orig-libc
+            test -e $NIX_CC_CROSS/nix-support/orig-libc
 
             # Figure out what extra flags to pass to the gcc compilers
             # being generated to make sure that they use our glibc.
-            extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
-            extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
+            extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
+            extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
 
             # Use *real* header files, otherwise a limits.h is generated
             # that does not include Glibc's limits.h (notably missing
             # SSIZE_MAX, which breaks the build).
-            NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
+            NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
 
             # The path to the Glibc binaries such as `crti.o'.
-            glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
+            glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
             glibc_libdir="$glibc_dir/lib"
             configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
 
@@ -171,11 +171,11 @@ preConfigure() {
         rm -Rf zlib
     fi
 
-    if test -f "$NIX_GCC/nix-support/orig-libc"; then
+    if test -f "$NIX_CC/nix-support/orig-libc"; then
         # Patch the configure script so it finds glibc headers.  It's
         # important for example in order not to get libssp built,
         # because its functionality is in glibc already.
-        glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
+        glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
         sed -i \
             -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
             gcc/configure
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix
index ef7846fadd07..cffb50ef211a 100644
--- a/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/pkgs/development/compilers/gcc/4.9/default.nix
@@ -247,11 +247,11 @@ stdenv.mkDerivation ({
            sed -i "${gnu_h}" \
                -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
         ''
-    else if cross != null || stdenv.gcc.libc != null then
+    else if cross != null || stdenv.cc.libc != null then
       # On NixOS, use the right path to the dynamic linker instead of
       # `/lib/ld*.so'.
       let
-        libc = if libcCross != null then libcCross else stdenv.gcc.libc;
+        libc = if libcCross != null then libcCross else stdenv.cc.libc;
       in
         '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
            for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
@@ -385,7 +385,7 @@ stdenv.mkDerivation ({
     NM_FOR_TARGET = "${stdenv.cross.config}-nm";
     CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
     # If we are making a cross compiler, cross != null
-    NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
+    NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
     dontStrip = true;
     configureFlags = ''
       ${if enableMultilib then "" else "--disable-multilib"}
diff --git a/pkgs/development/compilers/gcl/default.nix b/pkgs/development/compilers/gcl/default.nix
index f2252fe83813..452f5c09bf5c 100644
--- a/pkgs/development/compilers/gcl/default.nix
+++ b/pkgs/development/compilers/gcl/default.nix
@@ -9,11 +9,11 @@ let
 in
 
 (
-assert a.stdenv ? gcc ;
-assert a.stdenv.gcc ? gcc ;
-assert a.stdenv.gcc ? libc ;
-assert a.stdenv.gcc.gcc != null ;
-assert a.stdenv.gcc.libc != null ;
+assert a.stdenv ? cc ;
+assert a.stdenv.cc ? gcc ;
+assert a.stdenv.cc ? libc ;
+assert a.stdenv.cc.gcc != null ;
+assert a.stdenv.cc.libc != null ;
 
 rec {
   src = a.fetchurl {
@@ -37,7 +37,7 @@ rec {
   preBuild = a.fullDepEntry (''
     sed -re "s@/bin/cat@$(which cat)@g" -i configure */configure
     sed -re "s@if test -d /proc/self @if false @" -i configure
-    sed -re 's^([ \t])cpp ^\1cpp -I${a.stdenv.gcc.gcc}/include -I${a.stdenv.gcc.libc}/include ^g' -i makefile
+    sed -re 's^([ \t])cpp ^\1cpp -I${a.stdenv.cc.gcc}/include -I${a.stdenv.cc.libc}/include ^g' -i makefile
   '') ["minInit" "doUnpack" "addInputs"];
 
   /* doConfigure should be removed if not needed */
diff --git a/pkgs/development/compilers/ghc/6.10.1-binary.nix b/pkgs/development/compilers/ghc/6.10.1-binary.nix
index e7d4d3c1946f..02e37cc42cf1 100644
--- a/pkgs/development/compilers/ghc/6.10.1-binary.nix
+++ b/pkgs/development/compilers/ghc/6.10.1-binary.nix
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
     # find editline/gmp.
     (if stdenv.isLinux then ''
       find . -type f -perm +100 \
-          -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+          -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
           --set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
       for prog in ld ar gcc strip ranlib; do
         find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
diff --git a/pkgs/development/compilers/ghc/6.10.1.nix b/pkgs/development/compilers/ghc/6.10.1.nix
index ccb9f434230a..7c18d76626e2 100644
--- a/pkgs/development/compilers/ghc/6.10.1.nix
+++ b/pkgs/development/compilers/ghc/6.10.1.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   configureFlags=[
     "--with-gmp-libraries=${gmp}/lib"
     "--with-gmp-includes=${gmp}/include"
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   meta = {
diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix
index 5af89e38c21f..1e755ab6c0cc 100644
--- a/pkgs/development/compilers/ghc/6.10.2-binary.nix
+++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
     # find editline/gmp.
     (if stdenv.isLinux then ''
       find . -type f -perm +100 \
-          -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+          -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
           --set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
       for prog in ld ar gcc strip ranlib; do
         find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
diff --git a/pkgs/development/compilers/ghc/6.10.2.nix b/pkgs/development/compilers/ghc/6.10.2.nix
index 4988734f5809..9261ead80d71 100644
--- a/pkgs/development/compilers/ghc/6.10.2.nix
+++ b/pkgs/development/compilers/ghc/6.10.2.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   configureFlags=[
     "--with-gmp-libraries=${gmp}/lib"
     "--with-gmp-includes=${gmp}/include"
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   meta = {
diff --git a/pkgs/development/compilers/ghc/6.10.3.nix b/pkgs/development/compilers/ghc/6.10.3.nix
index f6683278e454..9ab6e2076b55 100644
--- a/pkgs/development/compilers/ghc/6.10.3.nix
+++ b/pkgs/development/compilers/ghc/6.10.3.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   configureFlags=[
     "--with-gmp-libraries=${gmp}/lib"
     "--with-gmp-includes=${gmp}/include"
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   meta = {
diff --git a/pkgs/development/compilers/ghc/6.10.4.nix b/pkgs/development/compilers/ghc/6.10.4.nix
index 5d02088c44cb..3c5a52c0c403 100644
--- a/pkgs/development/compilers/ghc/6.10.4.nix
+++ b/pkgs/development/compilers/ghc/6.10.4.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   configureFlags=[
     "--with-gmp-libraries=${gmp}/lib"
     "--with-gmp-includes=${gmp}/include"
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
diff --git a/pkgs/development/compilers/ghc/6.11.nix b/pkgs/development/compilers/ghc/6.11.nix
index 914403cdd660..8d57ecd59ac6 100644
--- a/pkgs/development/compilers/ghc/6.11.nix
+++ b/pkgs/development/compilers/ghc/6.11.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   configureFlags=[
     "--with-gmp-libraries=${gmp}/lib"
     "--with-gmp-includes=${gmp}/include"
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   preConfigure=[
diff --git a/pkgs/development/compilers/ghc/6.12.1-binary.nix b/pkgs/development/compilers/ghc/6.12.1-binary.nix
index da4658c3829e..8d03ca404527 100644
--- a/pkgs/development/compilers/ghc/6.12.1-binary.nix
+++ b/pkgs/development/compilers/ghc/6.12.1-binary.nix
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
     # find editline/gmp.
     (if stdenv.isLinux then ''
       find . -type f -perm +100 \
-          -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+          -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
           --set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
       sed -i "s|/usr/bin/perl|perl\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
       sed -i "s|/usr/bin/gcc|gcc\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
diff --git a/pkgs/development/compilers/ghc/6.12.1.nix b/pkgs/development/compilers/ghc/6.12.1.nix
index 31c763c4505c..66b277dc3766 100644
--- a/pkgs/development/compilers/ghc/6.12.1.nix
+++ b/pkgs/development/compilers/ghc/6.12.1.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   # required, because otherwise all symbols from HSffi.o are stripped, and
diff --git a/pkgs/development/compilers/ghc/6.12.2.nix b/pkgs/development/compilers/ghc/6.12.2.nix
index 5db5fc49fc66..a7252a7931df 100644
--- a/pkgs/development/compilers/ghc/6.12.2.nix
+++ b/pkgs/development/compilers/ghc/6.12.2.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   # required, because otherwise all symbols from HSffi.o are stripped, and
diff --git a/pkgs/development/compilers/ghc/6.12.3.nix b/pkgs/development/compilers/ghc/6.12.3.nix
index 08c9c1739ed0..a1cc16e1f9e6 100644
--- a/pkgs/development/compilers/ghc/6.12.3.nix
+++ b/pkgs/development/compilers/ghc/6.12.3.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
diff --git a/pkgs/development/compilers/ghc/6.4.2-binary.nix b/pkgs/development/compilers/ghc/6.4.2-binary.nix
index b42602829acd..5485326e2e7e 100644
--- a/pkgs/development/compilers/ghc/6.4.2-binary.nix
+++ b/pkgs/development/compilers/ghc/6.4.2-binary.nix
@@ -30,7 +30,7 @@ stdenv.mkDerivation {
   # find readline/gmp.
   postBuild = if stdenv.isLinux then "
     find . -type f -perm +100 \\
-        -exec patchelf --interpreter \"$(cat $NIX_GCC/nix-support/dynamic-linker)\" \\
+        -exec patchelf --interpreter \"$(cat $NIX_CC/nix-support/dynamic-linker)\" \\
         --set-rpath \"${readline}/lib:${ncurses}/lib:${gmp}/lib\" {} \\;
   " else "";
 
diff --git a/pkgs/development/compilers/ghc/6.4.2.nix b/pkgs/development/compilers/ghc/6.4.2.nix
index e336d4e83b1b..dfd38cc6a1a2 100644
--- a/pkgs/development/compilers/ghc/6.4.2.nix
+++ b/pkgs/development/compilers/ghc/6.4.2.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
 
   propagatedBuildInputs = [readline ncurses gmp];
 
-  configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
+  configureFlags = "--with-gcc=${stdenv.cc}/bin/gcc";
 
   preConfigure =
     ''
diff --git a/pkgs/development/compilers/ghc/6.8.2.nix b/pkgs/development/compilers/ghc/6.8.2.nix
index 8af158625906..0f649745a1ee 100644
--- a/pkgs/development/compilers/ghc/6.8.2.nix
+++ b/pkgs/development/compilers/ghc/6.8.2.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation (rec {
     "--with-gmp-libraries=${gmp}/lib"
     "--with-gmp-includes=${gmp}/include"
     "--with-readline-libraries=${readline}/lib"
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   preConfigure = "
diff --git a/pkgs/development/compilers/ghc/6.8.3.nix b/pkgs/development/compilers/ghc/6.8.3.nix
index 281ff61b700c..ea116781afb3 100644
--- a/pkgs/development/compilers/ghc/6.8.3.nix
+++ b/pkgs/development/compilers/ghc/6.8.3.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
     "--with-gmp-libraries=${gmp}/lib"
     "--with-gmp-includes=${gmp}/include"
     "--with-readline-libraries=${readline}/lib"
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   preConfigure = ''
diff --git a/pkgs/development/compilers/ghc/7.0.1.nix b/pkgs/development/compilers/ghc/7.0.1.nix
index b0b03d4b8ccb..3f992bb16ff9 100644
--- a/pkgs/development/compilers/ghc/7.0.1.nix
+++ b/pkgs/development/compilers/ghc/7.0.1.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   # required, because otherwise all symbols from HSffi.o are stripped, and
diff --git a/pkgs/development/compilers/ghc/7.0.2.nix b/pkgs/development/compilers/ghc/7.0.2.nix
index 5dd2e14b0c6f..3fb982e2a710 100644
--- a/pkgs/development/compilers/ghc/7.0.2.nix
+++ b/pkgs/development/compilers/ghc/7.0.2.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   # required, because otherwise all symbols from HSffi.o are stripped, and
diff --git a/pkgs/development/compilers/ghc/7.0.3.nix b/pkgs/development/compilers/ghc/7.0.3.nix
index c8d4b2648048..b20407513706 100644
--- a/pkgs/development/compilers/ghc/7.0.3.nix
+++ b/pkgs/development/compilers/ghc/7.0.3.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   # required, because otherwise all symbols from HSffi.o are stripped, and
diff --git a/pkgs/development/compilers/ghc/7.0.4-binary.nix b/pkgs/development/compilers/ghc/7.0.4-binary.nix
index 2c9b11f2b654..1fedfaedf51c 100644
--- a/pkgs/development/compilers/ghc/7.0.4-binary.nix
+++ b/pkgs/development/compilers/ghc/7.0.4-binary.nix
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
     # find editline/gmp.
     (if stdenv.isLinux then ''
       find . -type f -perm +100 \
-          -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+          -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
           --set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
       sed -i "s|/usr/bin/perl|perl\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
       sed -i "s|/usr/bin/gcc|gcc\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
diff --git a/pkgs/development/compilers/ghc/7.0.4.nix b/pkgs/development/compilers/ghc/7.0.4.nix
index ab69df12aa8c..bcce5ec03aef 100644
--- a/pkgs/development/compilers/ghc/7.0.4.nix
+++ b/pkgs/development/compilers/ghc/7.0.4.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
diff --git a/pkgs/development/compilers/ghc/7.2.1.nix b/pkgs/development/compilers/ghc/7.2.1.nix
index 867df5aae6bf..5a3af0f6492d 100644
--- a/pkgs/development/compilers/ghc/7.2.1.nix
+++ b/pkgs/development/compilers/ghc/7.2.1.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   # required, because otherwise all symbols from HSffi.o are stripped, and
diff --git a/pkgs/development/compilers/ghc/7.2.2.nix b/pkgs/development/compilers/ghc/7.2.2.nix
index 7e714ae3b789..51d94af40516 100644
--- a/pkgs/development/compilers/ghc/7.2.2.nix
+++ b/pkgs/development/compilers/ghc/7.2.2.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
diff --git a/pkgs/development/compilers/ghc/7.4.1.nix b/pkgs/development/compilers/ghc/7.4.1.nix
index 95590518a281..f666299c5b05 100644
--- a/pkgs/development/compilers/ghc/7.4.1.nix
+++ b/pkgs/development/compilers/ghc/7.4.1.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   # required, because otherwise all symbols from HSffi.o are stripped, and
diff --git a/pkgs/development/compilers/ghc/7.4.2-binary.nix b/pkgs/development/compilers/ghc/7.4.2-binary.nix
index f6dc974227cc..bc083fe7a82f 100644
--- a/pkgs/development/compilers/ghc/7.4.2-binary.nix
+++ b/pkgs/development/compilers/ghc/7.4.2-binary.nix
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
     # find editline/gmp.
     (if stdenv.isLinux then ''
       find . -type f -perm +100 \
-          -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+          -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
           --set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
       sed -i "s|/usr/bin/perl|perl\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
       sed -i "s|/usr/bin/gcc|gcc\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
diff --git a/pkgs/development/compilers/ghc/7.4.2.nix b/pkgs/development/compilers/ghc/7.4.2.nix
index 497a59e17fa5..2f577f12bc46 100644
--- a/pkgs/development/compilers/ghc/7.4.2.nix
+++ b/pkgs/development/compilers/ghc/7.4.2.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   # required, because otherwise all symbols from HSffi.o are stripped, and
diff --git a/pkgs/development/compilers/ghc/7.6.1.nix b/pkgs/development/compilers/ghc/7.6.1.nix
index 5a63d30390da..8f1a69519669 100644
--- a/pkgs/development/compilers/ghc/7.6.1.nix
+++ b/pkgs/development/compilers/ghc/7.6.1.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags=[
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   # required, because otherwise all symbols from HSffi.o are stripped, and
diff --git a/pkgs/development/compilers/ghc/7.6.2.nix b/pkgs/development/compilers/ghc/7.6.2.nix
index 45f877ffc7c9..d2ea2ebce053 100644
--- a/pkgs/development/compilers/ghc/7.6.2.nix
+++ b/pkgs/development/compilers/ghc/7.6.2.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags = [
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/gcc"
   ];
 
   # required, because otherwise all symbols from HSffi.o are stripped, and
diff --git a/pkgs/development/compilers/ghc/7.6.3.nix b/pkgs/development/compilers/ghc/7.6.3.nix
index dc84446a2767..9866ea38e86a 100644
--- a/pkgs/development/compilers/ghc/7.6.3.nix
+++ b/pkgs/development/compilers/ghc/7.6.3.nix
@@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
     export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
   '';
 
-  configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
+  configureFlags = "--with-gcc=${stdenv.cc}/bin/gcc";
 
   postInstall = ''
     # ghci uses mmap with rwx protection at it implements dynamic
diff --git a/pkgs/development/compilers/ghc/7.8.3-binary.nix b/pkgs/development/compilers/ghc/7.8.3-binary.nix
index f2c65c6ad053..a84b03fa0dd2 100644
--- a/pkgs/development/compilers/ghc/7.8.3-binary.nix
+++ b/pkgs/development/compilers/ghc/7.8.3-binary.nix
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
     # find editline/gmp.
     (if stdenv.isLinux then ''
       find . -type f -perm +100 \
-          -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+          -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
           --set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
       sed -i "s|/usr/bin/perl|perl\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
       sed -i "s|/usr/bin/gcc|gcc\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index 462007b1a3bb..22f42bd90b5e 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags = [
-    "--with-gcc=${stdenv.gcc}/bin/gcc"
+    "--with-gcc=${stdenv.cc}/bin/cc"
     "--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
   ];
 
diff --git a/pkgs/development/compilers/gnatboot/default.nix b/pkgs/development/compilers/gnatboot/default.nix
index 3cab8379720e..b8e3c172739a 100644
--- a/pkgs/development/compilers/gnatboot/default.nix
+++ b/pkgs/development/compilers/gnatboot/default.nix
@@ -21,8 +21,8 @@ stdenv.mkDerivation {
     cp -R * $out
     set +e
     for a in $out/bin/* ; do
-      patchelf --interpreter $(cat $NIX_GCC/nix-support/dynamic-linker) \
-        --set-rpath $(cat $NIX_GCC/nix-support/orig-libc)/lib:$(cat $NIX_GCC/nix-support/orig-gcc)/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib $a
+      patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+        --set-rpath $(cat $NIX_CC/nix-support/orig-libc)/lib:$(cat $NIX_CC/nix-support/orig-gcc)/lib64:$(cat $NIX_CC/nix-support/orig-gcc)/lib $a
     done
     set -e
     mv $out/bin/gnatgcc_2wrap $out/bin/gnatgcc
diff --git a/pkgs/development/compilers/go/1.3.nix b/pkgs/development/compilers/go/1.3.nix
index 3c465c3471f0..ee5dc2200bf8 100644
--- a/pkgs/development/compilers/go/1.3.nix
+++ b/pkgs/development/compilers/go/1.3.nix
@@ -1,7 +1,5 @@
 { stdenv, lib, fetchurl, fetchhg, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc, perl }:
 
-assert stdenv.gcc.gcc != null;
-
 let
   loader386 = "${glibc}/lib/ld-linux.so.2";
   loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
@@ -78,16 +76,16 @@ stdenv.mkDerivation {
            else throw "Unsupported system";
   GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
   GO386 = 387; # from Arch: don't assume sse2 on i686
-  CGO_ENABLED = 1;
+  CGO_ENABLED = if stdenv.isDarwin then 0 else 1;
 
   installPhase = ''
     export CC=cc
-
+  '' + stdenv.lib.optionalString (stdenv ? gcc) ''
     # http://lists.science.uu.nl/pipermail/nix-dev/2013-October/011891.html
     # Fix for "libgcc_s.so.1 must be installed for pthread_cancel to work"
     # during tests:
-    export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.gcc.gcc}/lib/libgcc_s.so))"
-
+    export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.cc.gcc}/lib/libgcc_s.so))"
+  '' + ''
     mkdir -p "$out/bin"
     export GOROOT="$(pwd)/"
     export GOBIN="$out/bin"
diff --git a/pkgs/development/compilers/idris/wrapper.nix b/pkgs/development/compilers/idris/wrapper.nix
index 2985b33c1706..857a31f6d4ab 100644
--- a/pkgs/development/compilers/idris/wrapper.nix
+++ b/pkgs/development/compilers/idris/wrapper.nix
@@ -1,4 +1,4 @@
-{ gmp, makeWrapper, gcc, runCommand, idris_plain, boehmgc}:
+{ stdenv, gmp, makeWrapper, runCommand, idris_plain, boehmgc}:
 
 runCommand "idris-wrapper" {} ''
   source ${makeWrapper}/nix-support/setup-hook
@@ -6,6 +6,6 @@ runCommand "idris-wrapper" {} ''
   ln -s ${idris_plain}/bin/idris $out/bin
       wrapProgram $out/bin/idris \
         --suffix NIX_CFLAGS_COMPILE : '"-I${gmp}/include -L${gmp}/lib -L${boehmgc}/lib"' \
-        --suffix PATH : ${gcc}/bin \
+        --suffix PATH : ${stdenv.cc}/bin \
         --suffix PATH : ${idris_plain}/bin
 ''
diff --git a/pkgs/development/compilers/julia/0.2.1.nix b/pkgs/development/compilers/julia/0.2.1.nix
index b701558efe0c..78407f6b6c64 100644
--- a/pkgs/development/compilers/julia/0.2.1.nix
+++ b/pkgs/development/compilers/julia/0.2.1.nix
@@ -4,7 +4,7 @@
  , tcl, tk, xproto, libX11, git, mpfr
  } :
 let
-  realGcc = stdenv.gcc.gcc;
+  realGcc = stdenv.cc.gcc;
 in
 stdenv.mkDerivation rec {
   pname = "julia";
diff --git a/pkgs/development/compilers/llvm/3.3/clang.nix b/pkgs/development/compilers/llvm/3.3/clang.nix
index 262e0bff2483..3282542ba3c2 100644
--- a/pkgs/development/compilers/llvm/3.3/clang.nix
+++ b/pkgs/development/compilers/llvm/3.3/clang.nix
@@ -2,7 +2,7 @@
 
 let
   version = "3.3";
-  gccReal = if (stdenv.gcc.gcc or null) == null then stdenv.gcc else stdenv.gcc.gcc;
+  gccReal = if (stdenv.cc.gcc or null) == null then stdenv.cc else stdenv.cc.gcc;
 in
 
 stdenv.mkDerivation {
@@ -11,15 +11,15 @@ stdenv.mkDerivation {
   buildInputs = [ perl llvm groff cmake libxml2 python ];
 
   patches = [ ./clang-tablegen-dir.patch ] ++
-            stdenv.lib.optional (stdenv.gcc.libc != null) ./clang-purity.patch;
+            stdenv.lib.optional (stdenv.cc.libc != null) ./clang-purity.patch;
 
   cmakeFlags = [
     "-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"
     "-DCMAKE_BUILD_TYPE=Release"
     "-DLLVM_TARGETS_TO_BUILD=all"
     "-DGCC_INSTALL_PREFIX=${gccReal}"
-  ] ++ stdenv.lib.optionals (stdenv.gcc.libc != null) [
-    "-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include/"
+  ] ++ stdenv.lib.optionals (stdenv.cc.libc != null) [
+    "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include/"
   ];
 
   enableParallelBuilding = true;
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
       sha256 = "15mrvw43s4frk1j49qr4v5viq68h8qlf10qs6ghd6mrsmgj5vddi";
   };
 
-  passthru = { gcc = stdenv.gcc.gcc; };
+  passthru = { gcc = stdenv.cc.gcc; };
 
   meta = {
     homepage = http://clang.llvm.org/;
diff --git a/pkgs/development/compilers/llvm/3.4/clang.nix b/pkgs/development/compilers/llvm/3.4/clang.nix
index fc33a7809a6c..a2358a6f0b77 100644
--- a/pkgs/development/compilers/llvm/3.4/clang.nix
+++ b/pkgs/development/compilers/llvm/3.4/clang.nix
@@ -1,9 +1,5 @@
 { stdenv, fetch, cmake, libxml2, libedit, llvm, version, clang-tools-extra_src }:
 
-# be sure not to rebuild clang on darwin; some packages request it specifically
-# we need to fix those
-assert stdenv.isDarwin -> stdenv.gcc.nativeTools;
-
 stdenv.mkDerivation {
   name = "clang-${version}";
 
@@ -28,8 +24,8 @@ stdenv.mkDerivation {
     "-DCMAKE_CXX_FLAGS=-std=c++11"
     "-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"
   ] ++
-  (stdenv.lib.optional (stdenv.gcc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include") ++
-  (stdenv.lib.optional (stdenv.gcc.gcc != null) "-DGCC_INSTALL_PREFIX=${stdenv.gcc.gcc}");
+  (stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include") ++
+  (stdenv.lib.optional (stdenv.cc.gcc != null) "-DGCC_INSTALL_PREFIX=${stdenv.cc.gcc}");
 
   # Clang expects to find LLVMgold in its own prefix
   # Clang expects to find sanitizer libraries in its own prefix
@@ -38,7 +34,7 @@ stdenv.mkDerivation {
     ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
   '';
 
-  passthru.gcc = stdenv.gcc.gcc;
+  passthru.gcc = stdenv.cc.gcc;
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/compilers/mentor/default.nix b/pkgs/development/compilers/mentor/default.nix
index b12a197451ac..7ff013b23441 100644
--- a/pkgs/development/compilers/mentor/default.nix
+++ b/pkgs/development/compilers/mentor/default.nix
@@ -18,7 +18,7 @@ let
         tar --strip-components=1 -xjf "$src" -C "$out"
 
         # Patch binaries
-        interpreter="$(cat "$NIX_GCC"/nix-support/dynamic-linker)"
+        interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)"
         for file in "$out"/bin/* "$out"/libexec/gcc/*/*/* "$out"/*/bin/*; do
             # Skip non-executable files
             case "$file" in
diff --git a/pkgs/development/compilers/mozart/builder.sh b/pkgs/development/compilers/mozart/builder.sh
index 58fe9a8effea..75914121611d 100644
--- a/pkgs/development/compilers/mozart/builder.sh
+++ b/pkgs/development/compilers/mozart/builder.sh
@@ -14,7 +14,7 @@ patchShebangs $out
 for f in $out/bin/*; do
   b=$(basename $f)
   if [ $b == "ozemulator" ] || [ $b == "ozwish" ]; then
-     patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+     patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
 	 --set-rpath $libPath \
 	 $f
     continue;
diff --git a/pkgs/development/compilers/opendylan/bin.nix b/pkgs/development/compilers/opendylan/bin.nix
index 4f0a1bd05129..4d18b8d328d6 100644
--- a/pkgs/development/compilers/opendylan/bin.nix
+++ b/pkgs/development/compilers/opendylan/bin.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
     mkdir -p "$out"
     tar --strip-components=1 -xjf "$src" -C "$out"
 
-    interpreter="$(cat "$NIX_GCC"/nix-support/dynamic-linker)"
+    interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)"
     for a in "$out"/bin/*; do 
       patchelf --set-interpreter "$interpreter" "$a"
       patchelf --set-rpath "$out/lib:${boehmgc}/lib" "$a"
diff --git a/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh b/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh
index 028164ac3955..56669ae0f2f6 100644
--- a/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh
+++ b/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh
@@ -5,7 +5,7 @@ unzip ${src} || true
 
 # set the dynamic linker of unpack200, necessary for construct script
 echo "patching unpack200"
-patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" --set-rpath "" */bin/unpack200
+patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "" */bin/unpack200
 
 echo "constructing JDK and JRE installations"
 if test -z "$installjdk"; then
@@ -46,7 +46,7 @@ rpath=$rpath${rpath:+:}$jrePath/lib/$architecture/jli
 
 # set all the dynamic linkers
 find $out -type f -perm +100 \
-    -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+    -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
     --set-rpath "$rpath" {} \;
 
 find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
index 657d18070e96..cabfaff7a1e2 100644
--- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
@@ -143,7 +143,7 @@ let result = stdenv.mkDerivation rec {
 
     # set all the dynamic linkers
     find $out -type f -perm +100 \
-        -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+        -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
         --set-rpath "$rpath" {} \;
 
     find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
@@ -173,8 +173,8 @@ let result = stdenv.mkDerivation rec {
    * libXt is only needed on amd64
    */
   libraries =
-    [stdenv.gcc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf atk] ++
-    (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.gcc.gcc] else []);
+    [stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf atk] ++
+    (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.cc.gcc] else []);
 
   passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
 
diff --git a/pkgs/development/compilers/oraclejdk/jdk6-linux.nix b/pkgs/development/compilers/oraclejdk/jdk6-linux.nix
index 9b384c5ae460..84fdf63f359a 100644
--- a/pkgs/development/compilers/oraclejdk/jdk6-linux.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk6-linux.nix
@@ -72,7 +72,7 @@ stdenv.mkDerivation {
    * libXt is only needed on amd64
    */
   libraries =
-    [stdenv.gcc.libc] ++
+    [stdenv.cc.libc] ++
     (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt] else []);
 
   inherit swingSupport pluginSupport architecture jce;
diff --git a/pkgs/development/compilers/path64/default.nix b/pkgs/development/compilers/path64/default.nix
index 9cc31537558d..d6112dcdfc48 100644
--- a/pkgs/development/compilers/path64/default.nix
+++ b/pkgs/development/compilers/path64/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
 
   patchPhase = ''
     sed -i s,/usr/bin/ld,$(type -P ld), src/driver/phases.c
-    sed -i s,/lib64/ld-linux-x86-64.so.2,${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2, src/include/main_defs.h.in
+    sed -i s,/lib64/ld-linux-x86-64.so.2,${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2, src/include/main_defs.h.in
   '';
 
   cmakeFlags = ''
@@ -22,7 +22,7 @@ stdenv.mkDerivation {
     -DPATH64_ENABLE_PSCRUNTIME=OFF
     -DPATH64_ENABLE_PROFILING=OFF -DPATH64_ENABLE_TARGETS=x8664 
     -DCMAKE_BUILD_TYPE=Debug -DPATH64_ENABLE_FORTRAN=OFF
-    -DPSC_CRT_PATH=${stdenv.gcc.libc}/lib
+    -DPSC_CRT_PATH=${stdenv.cc.libc}/lib
   '';
 
   makeFlags = "-j4";
diff --git a/pkgs/development/compilers/rustc/0.12.nix b/pkgs/development/compilers/rustc/0.12.nix
index d26e8ba4ddad..43df15505c0d 100644
--- a/pkgs/development/compilers/rustc/0.12.nix
+++ b/pkgs/development/compilers/rustc/0.12.nix
@@ -1,7 +1,5 @@
 {stdenv, fetchurl, which, file, perl, curl, python27, makeWrapper}:
 
-assert stdenv.gcc.gcc != null;
-
 /* Rust's build process has a few quirks :
 
 - It requires some patched in llvm that haven't landed upstream, so it
@@ -53,21 +51,22 @@ in stdenv.mkDerivation {
       mkdir -p "$out"
       cp -r bin "$out/bin"
     '' + (if stdenv.isLinux then ''
-      patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.gcc.dynamicLinker}" \
-               --set-rpath "${stdenv.gcc.gcc}/lib/:${stdenv.gcc.gcc}/lib64/" \
+      patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
+               --set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/" \
                "$out/bin/rustc"
     '' else "");
   };
 
-  configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ];
+  configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ]
+                ++ stdenv.lib.optional (stdenv.cc ? clang) "--enable-clang";
 
   # The compiler requires cc, so we patch the source to tell it where to find it
   patches = [ ./hardcode_paths.patch ./local_stage0.patch ];
   postPatch = ''
     substituteInPlace src/librustc/back/link.rs \
-      --subst-var-by "ccPath" "${stdenv.gcc}/bin/cc"
+      --subst-var-by "ccPath" "${stdenv.cc}/bin/cc"
     substituteInPlace src/librustc_back/archive.rs \
-      --subst-var-by "arPath" "${stdenv.gcc.binutils}/bin/ar"
+      --subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"
   '';
 
   buildInputs = [ which file perl curl python27 makeWrapper ];
diff --git a/pkgs/development/compilers/rustc/head.nix b/pkgs/development/compilers/rustc/head.nix
index 6cc866c63a8a..20c21bec06f9 100644
--- a/pkgs/development/compilers/rustc/head.nix
+++ b/pkgs/development/compilers/rustc/head.nix
@@ -2,8 +2,6 @@
 , tzdata, git, valgrind, procps, coreutils
 }:
 
-assert stdenv.gcc.gcc != null;
-
 /* Rust's build process has a few quirks :
 
 - It requires some patched in llvm that haven't landed upstream, so it
@@ -56,13 +54,14 @@ in stdenv.mkDerivation {
       mkdir -p "$out"
       cp -r bin "$out/bin"
     '' + (if stdenv.isLinux then ''
-      patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.gcc.dynamicLinker}" \
-               --set-rpath "${stdenv.gcc.gcc}/lib/:${stdenv.gcc.gcc}/lib64/" \
+      patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
+               --set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/" \
                "$out/bin/rustc"
     '' else "");
   };
 
-  configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ];
+  configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ]
+                ++ stdenv.lib.optional (stdenv.cc ? clang) "--enable-clang";
 
   # The compiler requires cc, so we patch the source to tell it where to find it
   patches = [ ./hardcode_paths.HEAD.patch ./local_stage0.HEAD.patch ]
@@ -70,9 +69,9 @@ in stdenv.mkDerivation {
 
   postPatch = ''
     substituteInPlace src/librustc_trans/back/link.rs \
-      --subst-var-by "ccPath" "${stdenv.gcc}/bin/cc"
+      --subst-var-by "ccPath" "${stdenv.cc}/bin/cc"
     substituteInPlace src/librustc_back/archive.rs \
-      --subst-var-by "arPath" "${stdenv.gcc.binutils}/bin/ar"
+      --subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"
 
     substituteInPlace src/rust-installer/gen-install-script.sh \
       --replace /bin/echo "${coreutils}/bin/echo"
diff --git a/pkgs/development/compilers/sbcl/1.2.0.nix b/pkgs/development/compilers/sbcl/1.2.0.nix
index c9d360f0ec5c..a12e8c5ae9da 100644
--- a/pkgs/development/compilers/sbcl/1.2.0.nix
+++ b/pkgs/development/compilers/sbcl/1.2.0.nix
@@ -47,6 +47,9 @@ stdenv.mkDerivation rec {
 
     sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
     sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
+
+    # Use whatever `cc` the stdenv provides
+    substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
   '';
 
   preBuild = ''
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index 17c0bed7caa0..4ca477442a9f 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -50,6 +50,9 @@ stdenv.mkDerivation rec {
 
     sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
     sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
+
+    # Use whatever `cc` the stdenv provides
+    substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
   '';
 
   preBuild = ''
diff --git a/pkgs/development/compilers/tinycc/default.nix b/pkgs/development/compilers/tinycc/default.nix
index bd71ab7b27fc..c9378451d1ff 100644
--- a/pkgs/development/compilers/tinycc/default.nix
+++ b/pkgs/development/compilers/tinycc/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
   '';
 
   preConfigure = ''
-    configureFlagsArray+=("--elfinterp=$(cat $NIX_GCC/nix-support/dynamic-linker)")
+    configureFlagsArray+=("--elfinterp=$(cat $NIX_CC/nix-support/dynamic-linker)")
     configureFlagsArray+=("--crtprefix=${stdenv.glibc}/lib")
     configureFlagsArray+=("--sysincludepaths=${stdenv.glibc}/include:{B}/include")
     configureFlagsArray+=("--libpaths=${stdenv.glibc}/lib")
diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix
index 51025847c902..e6460b5d509a 100644
--- a/pkgs/development/compilers/urweb/default.nix
+++ b/pkgs/development/compilers/urweb/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "077yakksxvdjlmwgc9wlz9jnkr345sikqjchvmxyv0axga5bw4rj";
   };
 
-  buildInputs = [ stdenv.gcc file openssl mlton mysql postgresql sqlite ];
+  buildInputs = [ stdenv.cc file openssl mlton mysql postgresql sqlite ];
 
   prePatch = ''
     sed -e 's@/usr/bin/file@${file}/bin/file@g' -i configure
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
 
   preConfigure =
     ''
-      export CC="${stdenv.gcc}/bin/gcc";
+      export CC="${stdenv.cc}/bin/gcc";
       export CCARGS="-I$out/include \
                       -L${mysql}/lib/mysql -L${postgresql}/lib -L${sqlite}/lib";
 
diff --git a/pkgs/development/guile-modules/guile-lib/default.nix b/pkgs/development/guile-modules/guile-lib/default.nix
index 2f77c273af7d..25bdc64a8fed 100644
--- a/pkgs/development/guile-modules/guile-lib/default.nix
+++ b/pkgs/development/guile-modules/guile-lib/default.nix
@@ -1,6 +1,6 @@
 {stdenv, fetchurl, guile, texinfo}:
 
-assert stdenv ? gcc && stdenv.gcc ? gcc && stdenv.gcc.gcc != null;
+assert stdenv ? cc && stdenv.cc ? gcc && stdenv.cc.gcc != null;
 
 stdenv.mkDerivation rec {
   name = "guile-lib-0.2.2";
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
   preCheck =
     # Make `libgcc_s.so' visible for `pthread_cancel'.
-    '' export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.gcc.gcc}/lib*/libgcc_s.so)):$LD_LIBRARY_PATH"
+    '' export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.cc.gcc}/lib*/libgcc_s.so)):$LD_LIBRARY_PATH"
     '';
 
   meta = {
diff --git a/pkgs/development/interpreters/dart/default.nix b/pkgs/development/interpreters/dart/default.nix
index d775b74c9036..f51ac1cdddf1 100644
--- a/pkgs/development/interpreters/dart/default.nix
+++ b/pkgs/development/interpreters/dart/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
     mkdir -p $out
     cp -R * $out/
     echo $libPath
-    patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+    patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
              --set-rpath $libPath \
              $out/bin/dart
     
@@ -33,7 +33,7 @@ stdenv.mkDerivation {
         sha256 = "00935c4vxfj2h3x354g75qdazswwissbwc7kj5k05l1m3lizikf6";
       };
  
-  libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.gcc ];
+  libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc ];
  
   dontStrip = true;
 }
\ No newline at end of file
diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix
index 00c4ddc447f2..f0d9d03991b8 100644
--- a/pkgs/development/interpreters/luajit/default.nix
+++ b/pkgs/development/interpreters/luajit/default.nix
@@ -14,10 +14,12 @@ stdenv.mkDerivation rec {
   patchPhase = ''
     substituteInPlace Makefile \
       --replace /usr/local $out
-  '' + stdenv.lib.optionalString (stdenv.gcc.libc != null)
+
+    substituteInPlace src/Makefile --replace gcc cc
+  '' + stdenv.lib.optionalString (stdenv.cc.libc != null)
   ''
     substituteInPlace Makefile \
-      --replace ldconfig ${stdenv.gcc.libc}/sbin/ldconfig
+      --replace ldconfig ${stdenv.cc.libc}/sbin/ldconfig
   '';
 
   configurePhase = false;
diff --git a/pkgs/development/interpreters/perl/5.16/default.nix b/pkgs/development/interpreters/perl/5.16/default.nix
index db9b821b8883..9ed3aa54f517 100644
--- a/pkgs/development/interpreters/perl/5.16/default.nix
+++ b/pkgs/development/interpreters/perl/5.16/default.nix
@@ -2,7 +2,7 @@
 
 let
 
-  libc = if stdenv.gcc.libc or null != null then stdenv.gcc.libc else "/usr";
+  libc = if stdenv.cc.libc or null != null then stdenv.cc.libc else "/usr";
 
 in
 
@@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
       ''}
     '';
 
-  preBuild = lib.optionalString (!(stdenv ? gcc && stdenv.gcc.nativeTools))
+  preBuild = lib.optionalString (!(stdenv ? cc && stdenv.cc.nativeTools))
     ''
       # Make Cwd work on NixOS (where we don't have a /bin/pwd).
       substituteInPlace dist/Cwd/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'"
diff --git a/pkgs/development/interpreters/perl/5.20/default.nix b/pkgs/development/interpreters/perl/5.20/default.nix
index bfd2c26bf70a..4ec1f08f15d7 100644
--- a/pkgs/development/interpreters/perl/5.20/default.nix
+++ b/pkgs/development/interpreters/perl/5.20/default.nix
@@ -14,7 +14,7 @@ assert enableThreading -> (stdenv ? glibc);
 
 let
 
-  libc = if stdenv.gcc.libc or null != null then stdenv.gcc.libc else "/usr";
+  libc = if stdenv.cc.libc or null != null then stdenv.cc.libc else "/usr";
 
 in
 
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
   # Miniperl needs -lm. perl needs -lrt.
   configureFlags =
     [ "-de"
-      "-Dcc=gcc"
+      "-Dcc=cc"
       "-Uinstallusrbinperl"
       "-Dinstallstyle=lib/perl5"
       "-Duseshrplib"
@@ -68,7 +68,7 @@ stdenv.mkDerivation rec {
       ''}
     '';
 
-  preBuild = optionalString (!(stdenv ? gcc && stdenv.gcc.nativeTools))
+  preBuild = optionalString (!(stdenv ? cc && stdenv.cc.nativeTools))
     ''
       # Make Cwd work on NixOS (where we don't have a /bin/pwd).
       substituteInPlace dist/PathTools/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'"
diff --git a/pkgs/development/interpreters/pypy/2.4/default.nix b/pkgs/development/interpreters/pypy/2.4/default.nix
index 5f00950a9589..c5d86766d1f0 100644
--- a/pkgs/development/interpreters/pypy/2.4/default.nix
+++ b/pkgs/development/interpreters/pypy/2.4/default.nix
@@ -22,13 +22,13 @@ let
     };
 
     buildInputs = [ bzip2 openssl pkgconfig pythonFull libffi ncurses expat sqlite tk tcl x11 libX11 makeWrapper ]
-      ++ stdenv.lib.optional (stdenv ? gcc && stdenv.gcc.libc != null) stdenv.gcc.libc
+      ++ stdenv.lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc
       ++ stdenv.lib.optional zlibSupport zlib;
 
     C_INCLUDE_PATH = stdenv.lib.concatStringsSep ":" (map (p: "${p}/include") buildInputs);
     LIBRARY_PATH = stdenv.lib.concatStringsSep ":" (map (p: "${p}/lib") buildInputs);
     LD_LIBRARY_PATH = stdenv.lib.concatStringsSep ":" (map (p: "${p}/lib") 
-      (stdenv.lib.filter (x : x.outPath != stdenv.gcc.libc.outPath or "") buildInputs));
+      (stdenv.lib.filter (x : x.outPath != stdenv.cc.libc.outPath or "") buildInputs));
 
     preConfigure = ''
       substituteInPlace Makefile \
diff --git a/pkgs/development/interpreters/python/2.6/default.nix b/pkgs/development/interpreters/python/2.6/default.nix
index 3894f401d4ae..dd4b3c3bdac0 100644
--- a/pkgs/development/interpreters/python/2.6/default.nix
+++ b/pkgs/development/interpreters/python/2.6/default.nix
@@ -44,7 +44,7 @@ let
     '';
 
   buildInputs =
-    optional (stdenv ? gcc && stdenv.gcc.libc != null) stdenv.gcc.libc ++
+    optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
     [ bzip2 openssl ]++ optionals includeModules [ db openssl ncurses gdbm readline x11 tcl tk sqlite ]
     ++ optional zlibSupport zlib;
 
diff --git a/pkgs/development/interpreters/python/2.7/default.nix b/pkgs/development/interpreters/python/2.7/default.nix
index d61b4129bfc1..75794d4b8a42 100644
--- a/pkgs/development/interpreters/python/2.7/default.nix
+++ b/pkgs/development/interpreters/python/2.7/default.nix
@@ -47,7 +47,7 @@ let
     '';
 
   buildInputs =
-    optional (stdenv ? gcc && stdenv.gcc.libc != null) stdenv.gcc.libc ++
+    optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
     [ bzip2 openssl ] ++ optionals includeModules [ db openssl ncurses gdbm libX11 readline x11 tcl tk sqlite ]
     ++ optional zlibSupport zlib;
 
diff --git a/pkgs/development/interpreters/xulrunner/default.nix b/pkgs/development/interpreters/xulrunner/default.nix
index 4dd1095c0ce8..1f24b4dde548 100644
--- a/pkgs/development/interpreters/xulrunner/default.nix
+++ b/pkgs/development/interpreters/xulrunner/default.nix
@@ -7,7 +7,7 @@
 , debugBuild ? false
 }:
 
-assert stdenv.gcc ? libc && stdenv.gcc.libc != null;
+assert stdenv.cc ? libc && stdenv.cc.libc != null;
 
 let version = firefox.version; in
 
diff --git a/pkgs/development/libraries/botan/generic.nix b/pkgs/development/libraries/botan/generic.nix
index 3fe8d1da7299..b4bd4e058412 100644
--- a/pkgs/development/libraries/botan/generic.nix
+++ b/pkgs/development/libraries/botan/generic.nix
@@ -17,9 +17,11 @@ stdenv.mkDerivation rec {
   buildInputs = [ python bzip2 zlib gmp openssl boost ];
 
   configurePhase = ''
-    python configure.py --prefix=$out --with-gnump --with-bzip2 --with-zlib --with-openssl
+    python configure.py --prefix=$out --with-gnump --with-bzip2 --with-zlib --with-openssl --cc=$CC
   '';
 
+  enableParallelBuilding = true;
+
   postInstall = ''
     cd "$out"/lib/pkgconfig
     ln -s botan-*.pc botan.pc || true
diff --git a/pkgs/development/libraries/fmod/default.nix b/pkgs/development/libraries/fmod/default.nix
index 78b70eebd7e6..5473f2eb9b6a 100644
--- a/pkgs/development/libraries/fmod/default.nix
+++ b/pkgs/development/libraries/fmod/default.nix
@@ -5,7 +5,7 @@ let
   bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
 
   libPath = stdenv.lib.makeLibraryPath
-    [ stdenv.gcc.libc stdenv.gcc.gcc ] + ":${stdenv.gcc.gcc}/lib64";
+    [ stdenv.cc.libc stdenv.cc.gcc ] + ":${stdenv.cc.gcc}/lib64";
   patchLib = x: "patchelf --set-rpath ${libPath} ${x}";
 in
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix
index 9d62472c27e7..8d88ef453030 100644
--- a/pkgs/development/libraries/gettext/default.nix
+++ b/pkgs/development/libraries/gettext/default.nix
@@ -35,8 +35,8 @@ stdenv.mkDerivation (rec {
   enableParallelBuilding = true;
 
   crossAttrs = {
-    buildInputs = stdenv.lib.optional (stdenv.gccCross.libc ? libiconv)
-      stdenv.gccCross.libc.libiconv.crossDrv;
+    buildInputs = stdenv.lib.optional (stdenv.ccCross.libc ? libiconv)
+      stdenv.ccCross.libc.libiconv.crossDrv;
     # Gettext fails to guess the cross compiler
     configureFlags = "CXX=${stdenv.cross.config}-g++";
   };
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index 4df07c8f6b86..ab6f4165e72b 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -7,7 +7,7 @@
 
 with stdenv.lib;
 
-assert stdenv.gcc.gcc != null;
+assert !stdenv.isDarwin -> stdenv.cc ? gcc;
 
 # TODO:
 # * Add gio-module-fam
@@ -83,7 +83,7 @@ stdenv.mkDerivation rec {
   preCheck = optionalString doCheck
     # libgcc_s.so.1 must be installed for pthread_cancel to work
     # also point to the glib/.libs path
-    '' export LD_LIBRARY_PATH="${stdenv.gcc.gcc}/lib:$NIX_BUILD_TOP/${name}/glib/.libs:$LD_LIBRARY_PATH"
+    '' export LD_LIBRARY_PATH="${stdenv.cc.gcc}/lib:$NIX_BUILD_TOP/${name}/glib/.libs:$LD_LIBRARY_PATH"
        export TZDIR="${tzdata}/share/zoneinfo"
        export XDG_CACHE_HOME="$TMP"
        export XDG_RUNTIME_HOME="$TMP"
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index da1d4f08fa2f..55f8d8a17259 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -167,8 +167,8 @@ stdenv.mkDerivation ({
 
     configureScript="`pwd`/../$sourceRoot/configure"
 
-    ${stdenv.lib.optionalString (stdenv.gcc.libc != null)
-      ''makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.gcc.libc}/lib"''
+    ${stdenv.lib.optionalString (stdenv.cc.libc != null)
+      ''makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.cc.libc}/lib"''
     }
 
     ${preConfigure}
diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix
index 1abba35af088..3273b89c84ea 100644
--- a/pkgs/development/libraries/glibc/default.nix
+++ b/pkgs/development/libraries/glibc/default.nix
@@ -8,7 +8,7 @@
 , withGd ? false, gd ? null, libpng ? null
 }:
 
-assert stdenv.gcc.gcc != null;
+assert stdenv.cc ? gcc;
 
 let
   build = import ./common.nix;
@@ -33,9 +33,9 @@ in
     # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
     # any special hack.
     preInstall = ''
-      if [ -f ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 ]; then
+      if [ -f ${stdenv.cc.gcc}/lib/libgcc_s.so.1 ]; then
           mkdir -p $out/lib
-          cp ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
+          cp ${stdenv.cc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
       fi
     '';
 
diff --git a/pkgs/development/libraries/haskell/cuda/default.nix b/pkgs/development/libraries/haskell/cuda/default.nix
index f281998890f5..25eced2e8102 100644
--- a/pkgs/development/libraries/haskell/cuda/default.nix
+++ b/pkgs/development/libraries/haskell/cuda/default.nix
@@ -9,7 +9,7 @@ cabal.mkDerivation (self: {
   isLibrary = true;
   isExecutable = true;
   buildTools = [ c2hs ];
-  extraLibraries = [ cudatoolkit nvidia_x11 self.stdenv.gcc ];
+  extraLibraries = [ cudatoolkit nvidia_x11 self.stdenv.cc ];
   doCheck = false;
   # Perhaps this should be the default in cabal.nix ...
   #
diff --git a/pkgs/development/libraries/libedit/default.nix b/pkgs/development/libraries/libedit/default.nix
index f913ab8e4938..9eee0d406543 100644
--- a/pkgs/development/libraries/libedit/default.nix
+++ b/pkgs/development/libraries/libedit/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   NROFF = "${groff}/bin/nroff";
 
   postInstall = ''
-    sed -i ${stdenv.lib.optionalString (stdenv.isDarwin && stdenv.gcc.nativeTools) "''"} s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc
+    sed -i ${stdenv.lib.optionalString (stdenv.isDarwin && stdenv.cc.nativeTools) "''"} s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc
   '';
 
   configureFlags = [ "--enable-widec" ];
diff --git a/pkgs/development/libraries/libopensc-dnie/default.nix b/pkgs/development/libraries/libopensc-dnie/default.nix
index 1452ec616069..f2855dd2a924 100644
--- a/pkgs/development/libraries/libopensc-dnie/default.nix
+++ b/pkgs/development/libraries/libopensc-dnie/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
     ar x opensc-dnie*
     tar xf data.tar.gz
 
-    RPATH=${glib}/lib:${opensc}/lib:${openssl}/lib:${openct}/lib:${libtool}/lib:${pcsclite}/lib:${stdenv.gcc.libc}/lib:${zlib}/lib
+    RPATH=${glib}/lib:${opensc}/lib:${openssl}/lib:${openct}/lib:${libtool}/lib:${pcsclite}/lib:${stdenv.cc.libc}/lib:${zlib}/lib
 
     for a in "usr/lib/"*.so*; do
         if ! test -L $a; then
diff --git a/pkgs/development/libraries/libre/default.nix b/pkgs/development/libraries/libre/default.nix
index ad4026857bb1..4e007c1b2efb 100644
--- a/pkgs/development/libraries/libre/default.nix
+++ b/pkgs/development/libraries/libre/default.nix
@@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
     "USE_ZLIB=1" "USE_OPENSSL=1" 
     ''PREFIX=$(out)''
   ]
-  ++ stdenv.lib.optional (stdenv.gcc.gcc != null) "SYSROOT_ALT=${stdenv.gcc.gcc}"
-  ++ stdenv.lib.optional (stdenv.gcc.libc != null) "SYSROOT=${stdenv.gcc.libc}"
+  ++ stdenv.lib.optional (stdenv.cc.gcc != null) "SYSROOT_ALT=${stdenv.cc.gcc}"
+  ++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}"
   ;
   meta = {
     homepage = "http://www.creytiv.com/re.html";
diff --git a/pkgs/development/libraries/librem/default.nix b/pkgs/development/libraries/librem/default.nix
index fe49609ce68d..b28a8cfd9a98 100644
--- a/pkgs/development/libraries/librem/default.nix
+++ b/pkgs/development/libraries/librem/default.nix
@@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
     "LIBRE_INC=${libre}/include/re"
     ''PREFIX=$(out)''
   ]
-  ++ stdenv.lib.optional (stdenv.gcc.gcc != null) "SYSROOT_ALT=${stdenv.gcc.gcc}"
-  ++ stdenv.lib.optional (stdenv.gcc.libc != null) "SYSROOT=${stdenv.gcc.libc}"
+  ++ stdenv.lib.optional (stdenv.cc.gcc != null) "SYSROOT_ALT=${stdenv.cc.gcc}"
+  ++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}"
   ;
   meta = {
     homepage = "http://www.creytiv.com/rem.html";
diff --git a/pkgs/development/libraries/libvncserver/default.nix b/pkgs/development/libraries/libvncserver/default.nix
index da9e1dc31482..581673af64dc 100644
--- a/pkgs/development/libraries/libvncserver/default.nix
+++ b/pkgs/development/libraries/libvncserver/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
     inherit (s) url sha256;
   };
   preConfigure = ''
-    sed -e 's@/usr/include/linux@${stdenv.gcc.libc}/include/linux@g' -i configure
+    sed -e 's@/usr/include/linux@${stdenv.cc.libc}/include/linux@g' -i configure
   '';
   meta = {
     inherit (s) version;
diff --git a/pkgs/development/libraries/pdf2xml/default.nix b/pkgs/development/libraries/pdf2xml/default.nix
index 4f3cd931fce5..c7c5aff24558 100644
--- a/pkgs/development/libraries/pdf2xml/default.nix
+++ b/pkgs/development/libraries/pdf2xml/default.nix
@@ -21,6 +21,8 @@ stdenv.mkDerivation {
     sed -i 's|XPDF = xpdf_3.01|XPDF = ${libxpdf}/lib|' Makefile
 
     mkdir exe
+
+    buildFlags+=" CXX=$CXX"
   '';
   
   installPhase = ''
diff --git a/pkgs/development/libraries/podofo/default.nix b/pkgs/development/libraries/podofo/default.nix
index b1464817a701..2a35fbd7515d 100644
--- a/pkgs/development/libraries/podofo/default.nix
+++ b/pkgs/development/libraries/podofo/default.nix
@@ -11,12 +11,12 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ zlib freetype libjpeg libtiff fontconfig openssl libpng ];
   nativeBuildInputs = [ cmake ];
-  buildInputs = [ lua5 stdenv.gcc.libc ];
+  buildInputs = [ lua5 stdenv.cc.libc ];
 
   crossAttrs = {
     propagatedBuildInputs = [ zlib.crossDrv freetype.crossDrv libjpeg.crossDrv
       libtiff.crossDrv fontconfig.crossDrv openssl.crossDrv libpng.crossDrv
-      lua5.crossDrv stdenv.gccCross.libc ];
+      lua5.crossDrv stdenv.ccCross.libc ];
   };
 
   # fix finding freetype-2.5
diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix
index 943d780473ac..a8d8beb41453 100644
--- a/pkgs/development/libraries/qt-4.x/4.8/default.nix
+++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
     # remove impure reference to /usr/lib/libstdc++.6.dylib
     # there might be more references, but this is the only one I could find
     substituteInPlace tools/macdeployqt/tests/tst_deployment_mac.cpp \
-      --replace /usr/lib/libstdc++.6.dylib "${stdenv.gcc}/lib/libstdc++.6.dylib"
+      --replace /usr/lib/libstdc++.6.dylib "${stdenv.cc}/lib/libstdc++.6.dylib"
   '';
 
   patches =
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
       (substituteAll {
         src = ./dlopen-absolute-paths.diff;
         inherit cups icu libXfixes;
-        glibc = stdenv.gcc.libc;
+        glibc = stdenv.cc.libc;
         openglDriver = if mesaSupported then mesa.driverLink else "/no-such-path";
       })
     ] ++ stdenv.lib.optional gtkStyle (substituteAll {
diff --git a/pkgs/development/libraries/scmccid/default.nix b/pkgs/development/libraries/scmccid/default.nix
index 1b0039952d7d..7dcde2a09a8c 100644
--- a/pkgs/development/libraries/scmccid/default.nix
+++ b/pkgs/development/libraries/scmccid/default.nix
@@ -1,6 +1,6 @@
 {stdenv, fetchurl, patchelf, libusb}:
 
-assert stdenv ? gcc && stdenv.gcc.libc != null;
+assert stdenv ? cc && stdenv.cc.libc != null;
 
 stdenv.mkDerivation rec {
   name = "scmccid-5.0.11";
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ patchelf ];
 
   installPhase = ''
-    RPATH=${libusb}/lib:${stdenv.gcc.libc}/lib
+    RPATH=${libusb}/lib:${stdenv.cc.libc}/lib
 
     for a in proprietary/*/Contents/Linux/*.so*; do
         if ! test -L $a; then
diff --git a/pkgs/development/libraries/serf/default.nix b/pkgs/development/libraries/serf/default.nix
index 49d7cec95901..b2e6cbfc7e5d 100644
--- a/pkgs/development/libraries/serf/default.nix
+++ b/pkgs/development/libraries/serf/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   buildPhase = ''
     scons PREFIX="$out" OPENSSL="${openssl}" ZLIB="${zlib}" APR="$(echo "${apr}"/bin/*-config)" \
         APU="$(echo "${aprutil}"/bin/*-config)" GSSAPI="${krb5}" CC="${
-          if stdenv.isDarwin then "clang" else "${stdenv.gcc}/bin/gcc"
+          if stdenv.isDarwin then "clang" else "${stdenv.cc}/bin/gcc"
         }"
   '';
 
diff --git a/pkgs/development/libraries/strigi/default.nix b/pkgs/development/libraries/strigi/default.nix
index 6b8b611d3f7a..ee89eda327d0 100644
--- a/pkgs/development/libraries/strigi/default.nix
+++ b/pkgs/development/libraries/strigi/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
   CLUCENE_HOME = clucene_core;
 
   buildInputs =
-    [ zlib bzip2 stdenv.gcc.libc libxml2 qt4 exiv2 clucene_core fam dbus_tools ];
+    [ zlib bzip2 stdenv.cc.libc libxml2 qt4 exiv2 clucene_core fam dbus_tools ];
 
   nativeBuildInputs = [ cmake pkgconfig perl ];
 
diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix
index 3abac0feab38..86dbcd1ec567 100644
--- a/pkgs/development/libraries/v8/default.nix
+++ b/pkgs/development/libraries/v8/default.nix
@@ -57,8 +57,8 @@ stdenv.mkDerivation rec {
   '';
 
   postFixup = if stdenv.isDarwin then ''
-    install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.gcc.gcc}/lib/libgcc_s.1.dylib $out/bin/d8
-    install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.gcc.gcc}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib
+    install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.gcc}/lib/libgcc_s.1.dylib $out/bin/d8
+    install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.gcc}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib
   '' else null;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/libraries/wtk/builder.sh b/pkgs/development/libraries/wtk/builder.sh
index 6db9469e46d2..ef0085da924c 100644
--- a/pkgs/development/libraries/wtk/builder.sh
+++ b/pkgs/development/libraries/wtk/builder.sh
@@ -22,6 +22,6 @@ for i in $libraries; do
     rpath=$rpath${rpath:+:}$i/lib
 done
 find $out -type f -perm +100 \
-    -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" {} \;
+    -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
 find $out -type f -perm +100 \
     -exec patchelf --set-rpath "$rpath" {} \;
diff --git a/pkgs/development/libraries/wtk/default.nix b/pkgs/development/libraries/wtk/default.nix
index 1ff34d45ba33..8544513e5809 100644
--- a/pkgs/development/libraries/wtk/default.nix
+++ b/pkgs/development/libraries/wtk/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ unzip ];
 
-  libraries = [ xlibs.libXpm xlibs.libXt xlibs.libX11 xlibs.libICE xlibs.libSM stdenv.gcc.gcc ];
+  libraries = [ xlibs.libXpm xlibs.libXt xlibs.libX11 xlibs.libICE xlibs.libSM stdenv.cc.gcc ];
 
   meta = {
     homepage = http://java.sun.com/products/sjwtoolkit/download.html;
diff --git a/pkgs/development/misc/amdapp-sdk/default.nix b/pkgs/development/misc/amdapp-sdk/default.nix
index 021c84fee0f1..02cf9b03bd77 100644
--- a/pkgs/development/misc/amdapp-sdk/default.nix
+++ b/pkgs/development/misc/amdapp-sdk/default.nix
@@ -46,7 +46,7 @@ in stdenv.mkDerivation rec {
 
   patchFlags = "-p0";
   buildInputs = [ makeWrapper perl mesa xorg.libX11 xorg.libXext xorg.libXaw xorg.libXi xorg.libXxf86vm ];
-  propagatedBuildInputs = [ stdenv.gcc ];
+  propagatedBuildInputs = [ stdenv.cc ];
   NIX_LDFLAGS = "-lX11 -lXext -lXmu -lXi -lXxf86vm";
   doCheck = false;
 
@@ -81,13 +81,13 @@ in stdenv.mkDerivation rec {
       cp -r "./samples/opencl/bin/${arch}/"* "$out/samples/opencl/bin"
       for f in $(find "$out/samples/opencl/bin/" -type f -not -name "*.*");
       do
-        wrapProgram "$f" --prefix PATH ":" "${stdenv.gcc}/bin"
+        wrapProgram "$f" --prefix PATH ":" "${stdenv.cc}/bin"
       done'' else ""
     }
 
     # Create wrappers
-    patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/bin/clinfo
-    patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib $out/bin/clinfo
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/clinfo
+    patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib $out/bin/clinfo
 
     # Fix modes
     find "$out/" -type f -exec chmod 644 {} \;
diff --git a/pkgs/development/mobile/androidenv/androidndk.nix b/pkgs/development/mobile/androidenv/androidndk.nix
index 91dbdc77361a..9f5393949ca7 100644
--- a/pkgs/development/mobile/androidenv/androidndk.nix
+++ b/pkgs/development/mobile/androidenv/androidndk.nix
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
     find $out \( \
         \( -type f -a -name "*.so*" \) -o \
         \( -type f -a -perm /0100 \) \
-        \) -exec patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-*so.? \
+        \) -exec patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-*so.? \
                           --set-rpath ${zlib}/lib:${ncurses}/lib {} \;
     # fix ineffective PROGDIR / MYNDKDIR determination
     for i in ndk-build ndk-gdb ndk-gdb-py
diff --git a/pkgs/development/mobile/androidenv/androidsdk.nix b/pkgs/development/mobile/androidenv/androidsdk.nix
index 9018f94b8b15..1ce6c1205b02 100644
--- a/pkgs/development/mobile/androidenv/androidsdk.nix
+++ b/pkgs/development/mobile/androidenv/androidsdk.nix
@@ -43,8 +43,8 @@ stdenv.mkDerivation rec {
         
         for i in emulator64-arm emulator64-mips emulator64-x86
         do
-            patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2 $i
-            patchelf --set-rpath ${stdenv.gcc.gcc}/lib64 $i
+            patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $i
+            patchelf --set-rpath ${stdenv.cc.gcc}/lib64 $i
         done
       ''}
       
@@ -80,11 +80,11 @@ stdenv.mkDerivation rec {
         # The monitor requires some more patching
         
         cd lib/monitor-x86
-        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux.so.2 monitor
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 monitor
         patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so
         
         wrapProgram `pwd`/monitor \
-          --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.gcc.gcc}/lib
+          --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.gcc}/lib
 
         cd ../..
       ''
@@ -93,11 +93,11 @@ stdenv.mkDerivation rec {
         # The monitor requires some more patching
         
         cd lib/monitor-x86_64
-        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2 monitor
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 monitor
         patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so
         
         wrapProgram `pwd`/monitor \
-          --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.gcc.gcc}/lib
+          --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.gcc}/lib
 
         cd ../..
       ''
diff --git a/pkgs/development/mobile/flashtool/default.nix b/pkgs/development/mobile/flashtool/default.nix
index 92b8c9a18456..d22eeb6c2138 100644
--- a/pkgs/development/mobile/flashtool/default.nix
+++ b/pkgs/development/mobile/flashtool/default.nix
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
     ln -s ${libusb1}/lib/libusb-1.0.so.0 ./x10flasher_lib/linux/lib32/libusbx-1.0.so
 
     chmod +x x10flasher_lib/unyaffs.linux.x86 x10flasher_lib/bin2elf x10flasher_lib/bin2sin
-    patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" x10flasher_lib/unyaffs.linux.x86
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" x10flasher_lib/unyaffs.linux.x86
     ln -sf unyaffs.linux.x86 x10flasher_lib/unyaffs.linux
 
     ln -s swt32.jar x10flasher_lib/swtlin/swt.jar
diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.1.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.1.nix
index 50346ac5115d..0fc6b7dca504 100644
--- a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.1.nix
+++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.1.nix
@@ -45,11 +45,11 @@ stdenv.mkDerivation {
     
     ${if stdenv.system == "i686-linux" then
       ''
-        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux.so.2 titanium_prep.linux32
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 titanium_prep.linux32
       ''
       else if stdenv.system == "x86_64-linux" then
       ''
-        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64
       ''
       else ""}
     
diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix
index 2ac4040714b0..b8f288131ed0 100644
--- a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix
+++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix
@@ -44,11 +44,11 @@ stdenv.mkDerivation {
     
     ${if stdenv.system == "i686-linux" then
       ''
-        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux.so.2 titanium_prep.linux32
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 titanium_prep.linux32
       ''
       else if stdenv.system == "x86_64-linux" then
       ''
-        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64
       ''
       else ""}
     
diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix
index be3628f26449..2d1cd049b141 100644
--- a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix
+++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix
@@ -44,11 +44,11 @@ stdenv.mkDerivation {
     
     ${if stdenv.system == "i686-linux" then
       ''
-        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux.so.2 titanium_prep.linux32
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 titanium_prep.linux32
       ''
       else if stdenv.system == "x86_64-linux" then
       ''
-        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64
       ''
       else ""}
     
diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.4.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.4.nix
index 1baf57a94cfb..c8fbb435f306 100644
--- a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.4.nix
+++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.4.nix
@@ -44,11 +44,11 @@ stdenv.mkDerivation {
     
     ${if stdenv.system == "i686-linux" then
       ''
-        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux.so.2 titanium_prep.linux32
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 titanium_prep.linux32
       ''
       else if stdenv.system == "x86_64-linux" then
       ''
-        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64
       ''
       else ""}
     
diff --git a/pkgs/development/tools/atom-shell/default.nix b/pkgs/development/tools/atom-shell/default.nix
index 141ba284cc05..99f989ecf28c 100644
--- a/pkgs/development/tools/atom-shell/default.nix
+++ b/pkgs/development/tools/atom-shell/default.nix
@@ -32,7 +32,7 @@ in stdenv.mkDerivation rec {
   installPhase = ''
     mkdir -p $out/bin
     unzip -d $out/bin $src
-    patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
     $out/bin/atom
     mv $out/bin/atom $out/bin/atom-shell
     wrapProgram $out/bin/atom-shell \
diff --git a/pkgs/development/tools/build-managers/cargo/common.nix b/pkgs/development/tools/build-managers/cargo/common.nix
index 0eb728bad28e..04eaec9daefe 100644
--- a/pkgs/development/tools/build-managers/cargo/common.nix
+++ b/pkgs/development/tools/build-managers/cargo/common.nix
@@ -37,8 +37,8 @@ rec {
       mkdir -p "$out"
       cp -r bin "$out/bin"
     '' + (if stdenv.isLinux then ''
-      patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.gcc.dynamicLinker}" \
-               --set-rpath "${stdenv.gcc.gcc}/lib/:${stdenv.gcc.gcc}/lib64/:${zlib}/lib" \
+      patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
+               --set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/:${zlib}/lib" \
                "$out/bin/cargo"
     '' else "");
   };
diff --git a/pkgs/development/tools/cdecl/default.nix b/pkgs/development/tools/cdecl/default.nix
index 48d04fd48ab3..9e9fcfcc19d5 100644
--- a/pkgs/development/tools/cdecl/default.nix
+++ b/pkgs/development/tools/cdecl/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
   preBuild = ''
     ${gnused}/bin/sed 's/getline/cdecl_getline/g' -i cdecl.c;
     makeFlagsArray=(CFLAGS="-DBSD -DUSE_READLINE -std=gnu89" LIBS=-lreadline);
-    makeFlags="$makeFlags PREFIX=$out BINDIR=$out/bin MANDIR=$out/man1 CATDIR=$out/cat1";
+    makeFlags="$makeFlags PREFIX=$out BINDIR=$out/bin MANDIR=$out/man1 CATDIR=$out/cat1 CC=$CC";
     mkdir -p $out/bin;
   '';
   buildInputs = [yacc flex readline ncurses];
diff --git a/pkgs/development/tools/misc/cflow/default.nix b/pkgs/development/tools/misc/cflow/default.nix
index b1322d461ee7..fb15be142616 100644
--- a/pkgs/development/tools/misc/cflow/default.nix
+++ b/pkgs/development/tools/misc/cflow/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   patchPhase = ''
     substituteInPlace "src/cflow.h"					\
       --replace "/usr/bin/cpp"						\
-                "$(cat ${stdenv.gcc}/nix-support/orig-gcc)/bin/cpp"
+                "$(cat ${stdenv.cc}/nix-support/orig-gcc)/bin/cpp"
   '';
 
   buildInputs = [ gettext ] ++
diff --git a/pkgs/development/tools/misc/saleae-logic/default.nix b/pkgs/development/tools/misc/saleae-logic/default.nix
index 2fa7194cf073..1e8d11fe622b 100644
--- a/pkgs/development/tools/misc/saleae-logic/default.nix
+++ b/pkgs/development/tools/misc/saleae-logic/default.nix
@@ -62,8 +62,8 @@ stdenv.mkDerivation rec {
     cp -r * "$out"
 
     # Patch it
-    patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" "$out/Logic"
-    patchelf --set-rpath "${stdenv.gcc.gcc}/lib:${stdenv.gcc.gcc}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$out/Logic"
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Logic"
+    patchelf --set-rpath "${stdenv.cc.gcc}/lib:${stdenv.cc.gcc}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$out/Logic"
 
     # Build the LD_PRELOAD library that makes Logic work from a read-only directory
     mkdir -p "$out/lib"
diff --git a/pkgs/development/tools/node-webkit/default.nix b/pkgs/development/tools/node-webkit/default.nix
index f79a5f562c03..7c7e7c8eb28d 100644
--- a/pkgs/development/tools/node-webkit/default.nix
+++ b/pkgs/development/tools/node-webkit/default.nix
@@ -10,7 +10,7 @@ let
     paths = [
       xlibs.libX11 xlibs.libXrender glib gtk atk pango cairo gdk_pixbuf
       freetype fontconfig xlibs.libXcomposite alsaLib xlibs.libXdamage
-      xlibs.libXext xlibs.libXfixes nss nspr gconf expat dbus stdenv.gcc.gcc
+      xlibs.libXext xlibs.libXfixes nss nspr gconf expat dbus stdenv.cc.gcc
       xlibs.libXtst xlibs.libXi
     ];
   };
@@ -30,8 +30,8 @@ in stdenv.mkDerivation rec {
     mkdir -p $out/share/node-webkit
     cp -R * $out/share/node-webkit
 
-    patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/share/node-webkit/nw
-    patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nw
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot
 
     ln -s ${udev}/lib/libudev.so $out/share/node-webkit/libudev.so.0
 
diff --git a/pkgs/development/tools/phantomjs/default.nix b/pkgs/development/tools/phantomjs/default.nix
index 17837933eae6..f6acfab73830 100644
--- a/pkgs/development/tools/phantomjs/default.nix
+++ b/pkgs/development/tools/phantomjs/default.nix
@@ -31,8 +31,8 @@ stdenv.mkDerivation rec {
 
   buildPhase = if stdenv.isDarwin then "" else ''
     patchelf \
-      --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-      --set-rpath "${freetype}/lib:${fontconfig}/lib:${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${openssl}/lib" \
+      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --set-rpath "${freetype}/lib:${fontconfig}/lib:${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${openssl}/lib" \
       bin/phantomjs
   '';
 
diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix
index 30430671342d..37ceeba77255 100644
--- a/pkgs/development/tools/selenium/chromedriver/default.nix
+++ b/pkgs/development/tools/selenium/chromedriver/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     mv chromedriver $out/bin
     patchelf --set-interpreter ${glibc}/lib/ld-linux-x86-64.so.2 $out/bin/chromedriver
     wrapProgram "$out/bin/chromedriver" \
-      --prefix LD_LIBRARY_PATH : "$(cat ${stdenv.gcc}/nix-support/orig-gcc)/lib64:${cairo}/lib:${fontconfig}/lib:${freetype}/lib:${gdk_pixbuf}/lib:${glib}/lib:${gtk}/lib:${libX11}/lib:${nspr}/lib:${nss}/lib:${pango}/lib:${libXrender}/lib:${gconf}/lib:${libXext}/lib:${libXi}/lib:\$LD_LIBRARY_PATH"
+      --prefix LD_LIBRARY_PATH : "$(cat ${stdenv.cc}/nix-support/orig-gcc)/lib64:${cairo}/lib:${fontconfig}/lib:${freetype}/lib:${gdk_pixbuf}/lib:${glib}/lib:${gtk}/lib:${libX11}/lib:${nspr}/lib:${nss}/lib:${pango}/lib:${libXrender}/lib:${gconf}/lib:${libXext}/lib:${libXi}/lib:\$LD_LIBRARY_PATH"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/tools/selenium/server/default.nix b/pkgs/development/tools/selenium/server/default.nix
index 0c3331653078..65c9f42ad14b 100644
--- a/pkgs/development/tools/selenium/server/default.nix
+++ b/pkgs/development/tools/selenium/server/default.nix
@@ -28,7 +28,7 @@ in stdenv.mkDerivation rec {
 
     ${jdk}/bin/jar xf $src launchers/launcher-linux-amd64
     patchelf \
-      --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
       --set-rpath "${gcc.gcc}/lib/:${gcc.gcc}/lib64:${xlibs.libX11}/lib" \
       launchers/launcher-linux-${arch}
     ${jdk}/bin/jar uf $src launchers/launcher-linux-${arch}