Check for -r in ccld mode too (#1972)

This commit is contained in:
Isuru Fernando 2016-10-08 11:14:37 +05:30 committed by Todd Gamblin
parent efae58a4ef
commit ccf530ba5e

4
lib/spack/env/cc vendored
View file

@ -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