summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2016-02-13 15:12:09 -0500
committerErik Schnetter <schnetter@gmail.com>2016-02-13 15:12:09 -0500
commit69064395eb61db3b03d1ed14f16bef7ec2c94ee3 (patch)
tree01366a72812d3d63bbcef6a91718c12d63bf5ef4 /lib
parent9a2c1090a6f40db762ac155d7d25063c2965c841 (diff)
downloadspack-69064395eb61db3b03d1ed14f16bef7ec2c94ee3.tar.gz
spack-69064395eb61db3b03d1ed14f16bef7ec2c94ee3.tar.bz2
spack-69064395eb61db3b03d1ed14f16bef7ec2c94ee3.tar.xz
spack-69064395eb61db3b03d1ed14f16bef7ec2c94ee3.zip
Add debug output
Diffstat (limited to 'lib')
-rwxr-xr-xlib/spack/env/cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 41933f5e1f..a431cffacf 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -174,19 +174,26 @@ while [ -n "$1" ]; do
libs+=("$arg")
;;
-Wl,*)
+ echo "FOUND arg=[$arg]" >&2
arg="${1#-Wl,}"
if [ -z "$arg" ]; then shift; arg="$1"; fi
+ echo "SHIFTED, arg=[$arg]" >&2
if [[ $arg = -rpath=* ]]; then
+ echo "CASE 1" >&2
arg="${arg#-rpath=}"
for rpath in ${arg//,/ }; do
+ echo " RPATH=[$rpath]" >&2
rpaths+=("$rpath")
done
elif [[ $arg = -rpath,* ]]; then
+ echo "CASE 2" >&2
arg="${arg#-rpath,}"
for rpath in ${arg//,/ }; do
+ echo " RPATH=[$rpath]" >&2
rpaths+=("$rpath")
done
elif [[ $arg = -rpath ]]; then
+ echo "CASE 3" >&2
shift; arg="$1"
if [[ $arg != -Wl,* ]]; then
die "-Wl,-rpath was not followed by -Wl,*"
@@ -194,9 +201,11 @@ while [ -n "$1" ]; do
# TODO: Handle multiple -Wl, continuations of -Wl,-rpath
arg="${arg#-Wl,}"
for rpath in ${arg//,/ }; do
+ echo " RPATH=[$rpath]" >&2
rpaths+=("$rpath")
done
else
+ echo "OTHER" >&2
other_args+=("-Wl,$arg")
fi
;;