summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2016-02-13 22:01:36 -0500
committerErik Schnetter <schnetter@gmail.com>2016-02-13 22:01:36 -0500
commit43670cbbd01562f6748f3ee6e2505be52e24bccb (patch)
tree5ce787000a2fb48525a922d910b0c90c7aaa447a /lib
parent52647b9a5d8ab4b2fff7387f65347164576be088 (diff)
downloadspack-43670cbbd01562f6748f3ee6e2505be52e24bccb.tar.gz
spack-43670cbbd01562f6748f3ee6e2505be52e24bccb.tar.bz2
spack-43670cbbd01562f6748f3ee6e2505be52e24bccb.tar.xz
spack-43670cbbd01562f6748f3ee6e2505be52e24bccb.zip
More games with quoting
Diffstat (limited to 'lib')
-rwxr-xr-xlib/spack/env/cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index c46986e19c..37483e0073 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -175,20 +175,19 @@ while [ -n "$1" ]; do
;;
-Wl,*)
arg="${1#-Wl,}"
- if [ -z "$arg" ]; then shift; arg="$1"; fi
- if [[ $arg =~ -rpath=.* ]]; then
+ 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")
+ rpaths+=("$rpath")
done
- elif [[ $arg = -rpath ]]; then
+ elif [[ $arg = "-rpath" ]]; then
shift; arg="$1"
- if [[ $arg != -Wl,* ]]; then
+ if [[ $arg != "-Wl,*" ]]; then
die "-Wl,-rpath was not followed by -Wl,*"
fi
# TODO: Handle multiple -Wl, continuations of -Wl,-rpath