summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/mpich
diff options
context:
space:
mode:
authoralalazo <massimiliano.culpo@googlemail.com>2016-06-15 13:16:29 +0200
committeralalazo <massimiliano.culpo@googlemail.com>2016-06-15 13:21:39 +0200
commitb59d4f243bc012f6673a53be75d197c16e5e7a06 (patch)
treec7e0024cf39a3c909f84de72b0c5941cbcab59a6 /var/spack/repos/builtin/packages/mpich
parent1b28991e0ad7ad87babbac2402391313fb428399 (diff)
downloadspack-b59d4f243bc012f6673a53be75d197c16e5e7a06.tar.gz
spack-b59d4f243bc012f6673a53be75d197c16e5e7a06.tar.bz2
spack-b59d4f243bc012f6673a53be75d197c16e5e7a06.tar.xz
spack-b59d4f243bc012f6673a53be75d197c16e5e7a06.zip
openmpi, mvapich2, mpich : filtered out "--Wl,--enable-new-dtag" in wrappers, as it turns RPATH into RUNPATH
Apart from that turned `os.path.join` into `join_path` and `os.environ` into `env` in the packages
Diffstat (limited to 'var/spack/repos/builtin/packages/mpich')
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py28
1 files changed, 17 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 164d9db541..e7ae63ef70 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -23,7 +23,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
class Mpich(Package):
@@ -102,18 +101,25 @@ class Mpich(Package):
be bound to whatever compiler they were built with.
"""
bin = self.prefix.bin
- mpicc = os.path.join(bin, 'mpicc')
- mpicxx = os.path.join(bin, 'mpicxx')
- mpif77 = os.path.join(bin, 'mpif77')
- mpif90 = os.path.join(bin, 'mpif90')
-
- spack_cc = os.environ['CC']
- spack_cxx = os.environ['CXX']
- spack_f77 = os.environ['F77']
- spack_fc = os.environ['FC']
-
+ mpicc = join_path(bin, 'mpicc')
+ mpicxx = join_path(bin, 'mpicxx')
+ mpif77 = join_path(bin, 'mpif77')
+ mpif90 = join_path(bin, 'mpif90')
+
+ spack_cc = env['CC']
+ spack_cxx = env['CXX']
+ spack_f77 = env['F77']
+ spack_fc = env['FC']
+
+ # Substitute Spack compile wrappers for the real
+ # underlying compiler
kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True }
filter_file('CC="%s"' % spack_cc , 'CC="%s"' % self.compiler.cc, mpicc, **kwargs)
filter_file('CXX="%s"'% spack_cxx, 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs)
filter_file('F77="%s"'% spack_f77, 'F77="%s"' % self.compiler.f77, mpif77, **kwargs)
filter_file('FC="%s"' % spack_fc , 'FC="%s"' % self.compiler.fc, mpif90, **kwargs)
+
+ # Remove this linking flag if present
+ # (it turns RPATH into RUNPATH)
+ for wrapper in (mpicc, mpicxx, mpif77, mpif90):
+ filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs)