summary refs log tree commit diff
path: root/pkgs/build-support/cc-wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r--pkgs/build-support/cc-wrapper/setup-hook.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/build-support/cc-wrapper/setup-hook.sh b/pkgs/build-support/cc-wrapper/setup-hook.sh
index cd98f57ee937..e23d7f4cf12b 100644
--- a/pkgs/build-support/cc-wrapper/setup-hook.sh
+++ b/pkgs/build-support/cc-wrapper/setup-hook.sh
@@ -34,5 +34,10 @@ if [ -n "@coreutils@" ]; then
     addToSearchPath PATH @coreutils@/bin
 fi
 
-export CC=@real_cc@
-export CXX=@real_cxx@
+if [ -z "$crossConfig" ]; then
+    export CC=@real_cc@
+    export CXX=@real_cxx@
+else
+    export BUILD_CC=@real_cc@
+    export BUILD_CXX=@real_cxx@
+fi