More quoting experiments

This commit is contained in:
Erik Schnetter 2016-02-14 10:43:55 -05:00
parent 43670cbbd0
commit a06e29fecb

8
lib/spack/env/cc vendored
View file

@ -175,22 +175,22 @@ while [ -n "$1" ]; do
;;
-Wl,*)
arg="${1#-Wl,}"
if [[ $arg = "-rpath=*" ]]; then
# TODO: Handle multiple -Wl, continuations of -Wl,-rpath
if [[ $arg == '-rpath='* ]]; then
arg="${arg#-rpath=}"
for rpath in ${arg//,/ }; do
rpaths+=("$rpath")
done
elif [[ $arg = "-rpath,*" ]]; then
elif [[ $arg == '-rpath,'* ]]; then
arg="${arg#-rpath,}"
for rpath in ${arg//,/ }; do
rpaths+=("$rpath")
done
elif [[ $arg = "-rpath" ]]; then
elif [[ $arg == '-rpath' ]]; then
shift; arg="$1"
if [[ $arg != "-Wl,*" ]]; then
die "-Wl,-rpath was not followed by -Wl,*"
fi
# TODO: Handle multiple -Wl, continuations of -Wl,-rpath
arg="${arg#-Wl,}"
for rpath in ${arg//,/ }; do
rpaths+=("$rpath")