Add debug output
This commit is contained in:
parent
9a2c1090a6
commit
69064395eb
1 changed files with 9 additions and 0 deletions
9
lib/spack/env/cc
vendored
9
lib/spack/env/cc
vendored
|
@ -174,19 +174,26 @@ while [ -n "$1" ]; do
|
||||||
libs+=("$arg")
|
libs+=("$arg")
|
||||||
;;
|
;;
|
||||||
-Wl,*)
|
-Wl,*)
|
||||||
|
echo "FOUND arg=[$arg]" >&2
|
||||||
arg="${1#-Wl,}"
|
arg="${1#-Wl,}"
|
||||||
if [ -z "$arg" ]; then shift; arg="$1"; fi
|
if [ -z "$arg" ]; then shift; arg="$1"; fi
|
||||||
|
echo "SHIFTED, arg=[$arg]" >&2
|
||||||
if [[ $arg = -rpath=* ]]; then
|
if [[ $arg = -rpath=* ]]; then
|
||||||
|
echo "CASE 1" >&2
|
||||||
arg="${arg#-rpath=}"
|
arg="${arg#-rpath=}"
|
||||||
for rpath in ${arg//,/ }; do
|
for rpath in ${arg//,/ }; do
|
||||||
|
echo " RPATH=[$rpath]" >&2
|
||||||
rpaths+=("$rpath")
|
rpaths+=("$rpath")
|
||||||
done
|
done
|
||||||
elif [[ $arg = -rpath,* ]]; then
|
elif [[ $arg = -rpath,* ]]; then
|
||||||
|
echo "CASE 2" >&2
|
||||||
arg="${arg#-rpath,}"
|
arg="${arg#-rpath,}"
|
||||||
for rpath in ${arg//,/ }; do
|
for rpath in ${arg//,/ }; do
|
||||||
|
echo " RPATH=[$rpath]" >&2
|
||||||
rpaths+=("$rpath")
|
rpaths+=("$rpath")
|
||||||
done
|
done
|
||||||
elif [[ $arg = -rpath ]]; then
|
elif [[ $arg = -rpath ]]; then
|
||||||
|
echo "CASE 3" >&2
|
||||||
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,*"
|
||||||
|
@ -194,9 +201,11 @@ while [ -n "$1" ]; do
|
||||||
# TODO: Handle multiple -Wl, continuations of -Wl,-rpath
|
# TODO: Handle multiple -Wl, continuations of -Wl,-rpath
|
||||||
arg="${arg#-Wl,}"
|
arg="${arg#-Wl,}"
|
||||||
for rpath in ${arg//,/ }; do
|
for rpath in ${arg//,/ }; do
|
||||||
|
echo " RPATH=[$rpath]" >&2
|
||||||
rpaths+=("$rpath")
|
rpaths+=("$rpath")
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
echo "OTHER" >&2
|
||||||
other_args+=("-Wl,$arg")
|
other_args+=("-Wl,$arg")
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue