summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-07-04 22:59:02 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-07-04 22:59:02 -0700
commitd687e332ad41cd7c84bf0007f8c331e56470da18 (patch)
treebfca6368b8c76c4277b11d204430765700cb9545 /lib
parent690937f9533765f6b5c2b815d9c4798f15456918 (diff)
downloadspack-d687e332ad41cd7c84bf0007f8c331e56470da18.tar.gz
spack-d687e332ad41cd7c84bf0007f8c331e56470da18.tar.bz2
spack-d687e332ad41cd7c84bf0007f8c331e56470da18.tar.xz
spack-d687e332ad41cd7c84bf0007f8c331e56470da18.zip
Fix compile bugs for gcc on Mac OS X with macports.
- add macports to things that are cleaned out of the environment. - linker incompatibilities cause issues with packages like OpenSSL. - also clean up NOQA stuff in OpenSSL
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_environment.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index ce0b91b718..fe5186a7d7 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -277,6 +277,15 @@ def set_build_environment_variables(pkg, env, dirty=False):
env.unset('LD_RUN_PATH')
env.unset('DYLD_LIBRARY_PATH')
+ # Remove any macports installs from the PATH. The macports ld can
+ # cause conflicts with the built-in linker on el capitan. Solves
+ # assembler issues, e.g.:
+ # suffix or operands invalid for `movq'"
+ path = get_path('PATH')
+ for p in path:
+ if '/macports/' in p:
+ env.remove_path('PATH', p)
+
# Add bin directories from dependencies to the PATH for the build.
bin_dirs = reversed(
filter(os.path.isdir, ['%s/bin' % prefix for prefix in dep_prefixes]))