diff options
author | Isuru Fernando <isuru.11@cse.mrt.ac.lk> | 2016-10-08 11:14:37 +0530 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-10-07 22:44:37 -0700 |
commit | ccf530ba5ef8b96ce084d97fec93c20184e9564c (patch) | |
tree | d59bc604a3fc9ee6e792edb62d8cbadf10f0895a | |
parent | efae58a4efda9d21a62a4710ee59207a1624d7ea (diff) | |
download | spack-ccf530ba5ef8b96ce084d97fec93c20184e9564c.tar.gz spack-ccf530ba5ef8b96ce084d97fec93c20184e9564c.tar.bz2 spack-ccf530ba5ef8b96ce084d97fec93c20184e9564c.tar.xz spack-ccf530ba5ef8b96ce084d97fec93c20184e9564c.zip |
Check for `-r` in ccld mode too (#1972)
-rwxr-xr-x | lib/spack/env/cc | 4 |
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 |