summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-03-27 14:14:49 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2015-03-27 14:14:49 -0700
commitad62b93df92058641104242fd31a72697bbf916f (patch)
treede79dff23a902dcc670c6fcaccd79417a7e27469
parentb2f54bac9572ce75d8129fb147a6deec3aaca221 (diff)
parenta4cce9eb69048b082e0233499ec764d7c5abec0c (diff)
downloadspack-ad62b93df92058641104242fd31a72697bbf916f.tar.gz
spack-ad62b93df92058641104242fd31a72697bbf916f.tar.bz2
spack-ad62b93df92058641104242fd31a72697bbf916f.tar.xz
spack-ad62b93df92058641104242fd31a72697bbf916f.zip
Merge pull request #23 from mplegendre/rpath_cleanup
Only convert -L<path> to -Wl,-rpath,<path> in compiler scripts if <path>...
-rwxr-xr-xlib/spack/env/cc2
-rw-r--r--lib/spack/spack/build_environment.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 19ca31cace..5c431f5325 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -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")
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index d11e2e270c..487bb59a8f 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -52,6 +52,7 @@ SPACK_NO_PARALLEL_MAKE = 'SPACK_NO_PARALLEL_MAKE'
SPACK_ENV_PATH = 'SPACK_ENV_PATH'
SPACK_DEPENDENCIES = 'SPACK_DEPENDENCIES'
SPACK_PREFIX = 'SPACK_PREFIX'
+SPACK_INSTALL = 'SPACK_INSTALL'
SPACK_DEBUG = 'SPACK_DEBUG'
SPACK_SHORT_SPEC = 'SPACK_SHORT_SPEC'
SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR'
@@ -125,6 +126,9 @@ def set_build_environment_variables(pkg):
# Install prefix
os.environ[SPACK_PREFIX] = pkg.prefix
+ # Install root prefix
+ os.environ[SPACK_INSTALL] = spack.install_path
+
# Remove these vars from the environment during build becaus they
# can affect how some packages find libraries. We want to make
# sure that builds never pull in unintended external dependencies.