summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/relocate.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py
index d722e587da..87de08c9b2 100644
--- a/lib/spack/spack/relocate.py
+++ b/lib/spack/spack/relocate.py
@@ -684,13 +684,6 @@ def file_is_relocatable(file, paths_to_relocate=None):
strings = Executable('strings')
- # if we're relocating patchelf itself, use it
-
- if file[-13:] == "/bin/patchelf":
- patchelf = Executable(file)
- else:
- patchelf = Executable(get_patchelf())
-
# Remove the RPATHS from the strings in the executable
set_of_strings = set(strings(file, output=str).split())
@@ -700,8 +693,8 @@ def file_is_relocatable(file, paths_to_relocate=None):
if platform.system().lower() == 'linux':
if m_subtype == 'x-executable' or m_subtype == 'x-sharedlib':
- rpaths = patchelf('--print-rpath', file, output=str).strip()
- set_of_strings.discard(rpaths.strip())
+ rpaths = set(get_existing_elf_rpaths(file))
+ set_of_strings.discard(rpaths)
if platform.system().lower() == 'darwin':
if m_subtype == 'x-mach-binary':
rpaths, deps, idpath = macho_get_paths(file)