summaryrefslogtreecommitdiff
path: root/lib/spack/env/cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/env/cc')
-rwxr-xr-xlib/spack/env/cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 18fd8f7bdb..cb07a2ffea 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -162,7 +162,7 @@ fi
# It doesn't work with -rpath.
# This variable controls whether they are added.
add_rpaths=true
-if [[ mode == ld && $OSTYPE == darwin* ]]; then
+if [[ $mode == ld && "$SPACK_SHORT_SPEC" =~ "darwin" ]]; then
for arg in "$@"; do
if [[ $arg == -r ]]; then
add_rpaths=false