Only convert -L<path> to -Wl,-rpath,<path> in compiler scripts if <path> points into the spack install area

This specifically fixes problems with building gcc, as build and system directories were turning in in gcc library rpaths.
This commit is contained in:
Matthew LeGendre
2015-03-27 13:58:57 -07:00
parent af92250c7e
commit a4cce9eb69
2 changed files with 5 additions and 1 deletions

2
lib/spack/env/cc vendored
View File

@@ -262,7 +262,7 @@ done
# Include all -L's and prefix/whatever dirs in rpath
for dir in "${libraries[@]}"; do
[ "$dir" != "." ] && rpaths+=("$dir")
[[ dir = $SPACK_INSTALL* ]] && rpaths+=("$dir")
done
rpaths+=("$SPACK_PREFIX/lib")
rpaths+=("$SPACK_PREFIX/lib64")