More quoting experiments
This commit is contained in:
parent
43670cbbd0
commit
a06e29fecb
1 changed files with 4 additions and 4 deletions
8
lib/spack/env/cc
vendored
8
lib/spack/env/cc
vendored
|
@ -175,22 +175,22 @@ while [ -n "$1" ]; do
|
||||||
;;
|
;;
|
||||||
-Wl,*)
|
-Wl,*)
|
||||||
arg="${1#-Wl,}"
|
arg="${1#-Wl,}"
|
||||||
if [[ $arg = "-rpath=*" ]]; then
|
# TODO: Handle multiple -Wl, continuations of -Wl,-rpath
|
||||||
|
if [[ $arg == '-rpath='* ]]; then
|
||||||
arg="${arg#-rpath=}"
|
arg="${arg#-rpath=}"
|
||||||
for rpath in ${arg//,/ }; do
|
for rpath in ${arg//,/ }; do
|
||||||
rpaths+=("$rpath")
|
rpaths+=("$rpath")
|
||||||
done
|
done
|
||||||
elif [[ $arg = "-rpath,*" ]]; then
|
elif [[ $arg == '-rpath,'* ]]; then
|
||||||
arg="${arg#-rpath,}"
|
arg="${arg#-rpath,}"
|
||||||
for rpath in ${arg//,/ }; do
|
for rpath in ${arg//,/ }; do
|
||||||
rpaths+=("$rpath")
|
rpaths+=("$rpath")
|
||||||
done
|
done
|
||||||
elif [[ $arg = "-rpath" ]]; then
|
elif [[ $arg == '-rpath' ]]; then
|
||||||
shift; arg="$1"
|
shift; arg="$1"
|
||||||
if [[ $arg != "-Wl,*" ]]; then
|
if [[ $arg != "-Wl,*" ]]; then
|
||||||
die "-Wl,-rpath was not followed by -Wl,*"
|
die "-Wl,-rpath was not followed by -Wl,*"
|
||||||
fi
|
fi
|
||||||
# TODO: Handle multiple -Wl, continuations of -Wl,-rpath
|
|
||||||
arg="${arg#-Wl,}"
|
arg="${arg#-Wl,}"
|
||||||
for rpath in ${arg//,/ }; do
|
for rpath in ${arg//,/ }; do
|
||||||
rpaths+=("$rpath")
|
rpaths+=("$rpath")
|
||||||
|
|
Loading…
Reference in a new issue