diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/binary_distribution.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 268f4bbe0d..242a1d2b66 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -6,6 +6,7 @@ import codecs import os import re +import sys import tarfile import shutil import tempfile @@ -460,7 +461,11 @@ def write_buildinfo_file(spec, workdir, rel=False): tty.warn(msg) if relocate.needs_binary_relocation(m_type, m_subtype): - if not filename.endswith('.o'): + if ((m_subtype in ('x-executable', 'x-sharedlib') + and sys.platform != 'darwin') or + (m_subtype in ('x-mach-binary') + and sys.platform == 'darwin') or + (not filename.endswith('.o'))): rel_path_name = os.path.relpath(path_name, prefix) binary_to_relocate.append(rel_path_name) if relocate.needs_text_relocation(m_type, m_subtype): |