summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIsuru Fernando <isuru.11@cse.mrt.ac.lk>2016-10-08 11:14:37 +0530
committerTodd Gamblin <tgamblin@llnl.gov>2016-10-07 22:44:37 -0700
commitccf530ba5ef8b96ce084d97fec93c20184e9564c (patch)
treed59bc604a3fc9ee6e792edb62d8cbadf10f0895a /lib
parentefae58a4efda9d21a62a4710ee59207a1624d7ea (diff)
downloadspack-ccf530ba5ef8b96ce084d97fec93c20184e9564c.tar.gz
spack-ccf530ba5ef8b96ce084d97fec93c20184e9564c.tar.bz2
spack-ccf530ba5ef8b96ce084d97fec93c20184e9564c.tar.xz
spack-ccf530ba5ef8b96ce084d97fec93c20184e9564c.zip
Check for `-r` in ccld mode too (#1972)
Diffstat (limited to 'lib')
-rwxr-xr-xlib/spack/env/cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 4b8922178a..60e24979c8 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -204,9 +204,9 @@ fi
# It doesn't work with -rpath.
# This variable controls whether they are added.
add_rpaths=true
-if [[ $mode == ld && "$SPACK_SHORT_SPEC" =~ "darwin" ]]; then
+if [[ ($mode == ld || $mode == ccld) && "$SPACK_SHORT_SPEC" =~ "darwin" ]]; then
for arg in "$@"; do
- if [[ $arg == -r ]]; then
+ if [[ ($arg == -r && $mode == ld) || ($arg == -Wl,-r && $mode == ccld) ]]; then
add_rpaths=false
break
fi