summary refs log tree commit diff
path: root/pkgs/build-support/cc-wrapper
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-06-14 19:28:32 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2018-06-14 19:29:30 -0400
commitad5540926631578af418e2e307c8d251ba55d753 (patch)
tree9445afd2be9fc1e5f4f9972d7f8747223b2ecf5b /pkgs/build-support/cc-wrapper
parent4821a073708ee6ca0cae06ff51322a785b3983db (diff)
downloadnixpkgs-ad5540926631578af418e2e307c8d251ba55d753.tar
nixpkgs-ad5540926631578af418e2e307c8d251ba55d753.tar.gz
nixpkgs-ad5540926631578af418e2e307c8d251ba55d753.tar.bz2
nixpkgs-ad5540926631578af418e2e307c8d251ba55d753.tar.lz
nixpkgs-ad5540926631578af418e2e307c8d251ba55d753.tar.xz
nixpkgs-ad5540926631578af418e2e307c8d251ba55d753.tar.zst
nixpkgs-ad5540926631578af418e2e307c8d251ba55d753.zip
cc-wrapper: fix eval error on mac
When doing cross to linux, we will not have a GCC compiler (yet). We
can hopefully skip the cxx stdlib stuff for now.
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index 7a18993d607..803d8b9fa12 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -42,7 +42,7 @@ let
   # The wrapper scripts use 'cat' and 'grep', so we may need coreutils.
   coreutils_bin = if nativeTools then "" else getBin coreutils;
 
-  default_cxx_stdlib_compile = optionalString (targetPlatform.isLinux && !(cc.isGNU or false) && !nativeTools)
+  default_cxx_stdlib_compile = optionalString (targetPlatform.isLinux && !(cc.isGNU or false) && !nativeTools && cc ? gcc)
     "-isystem $(echo -n ${cc.gcc}/include/c++/*) -isystem $(echo -n ${cc.gcc}/include/c++/*)/$(${cc.gcc}/bin/gcc -dumpmachine)";
 
   dashlessTarget = stdenv.lib.replaceStrings ["-"] ["_"] targetPlatform.config;