diff options
author | Christoph Junghans <christoph.junghans@gmail.com> | 2018-02-28 10:37:01 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2018-02-28 09:37:01 -0800 |
commit | 3089207ced6b7a8efdb36c4f6d92272dbda3e984 (patch) | |
tree | 62ffe543dc7823209c9f73fa989b7cfd94bcc979 | |
parent | 6c2fe27f419f2b788307fb2d7e80a1f710412362 (diff) | |
download | spack-3089207ced6b7a8efdb36c4f6d92272dbda3e984.tar.gz spack-3089207ced6b7a8efdb36c4f6d92272dbda3e984.tar.bz2 spack-3089207ced6b7a8efdb36c4f6d92272dbda3e984.tar.xz spack-3089207ced6b7a8efdb36c4f6d92272dbda3e984.zip |
minighost: fix build on Ubuntu (#7354)
* minighost: fix build on Ubuntu
* minighost: append -lgfortran only for gcc
-rw-r--r-- | var/spack/repos/builtin/packages/minighost/package.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/minighost/package.py b/var/spack/repos/builtin/packages/minighost/package.py index 57e590af30..5142508332 100644 --- a/var/spack/repos/builtin/packages/minighost/package.py +++ b/var/spack/repos/builtin/packages/minighost/package.py @@ -55,16 +55,17 @@ class Minighost(MakefilePackage): targets.append('PROTOCOL=-D_MG_MPI') targets.append('FC={0}'.format(self.spec['mpi'].mpif77)) targets.append('CC={0}'.format(self.spec['mpi'].mpicc)) - targets.append( - 'LIBS=-lm -lmpi_cxx') else: targets.append('PROTOCOL=-D_MG_SERIAL') targets.append('FC=f77') targets.append('CC=cc') - targets.append('LIBS=-lm -lgfortran') if '%gcc' in self.spec: targets.append('COMPILER_SUITE=gnu') + if '+mpi' in self.spec: + targets.append('LIBS=-lm -lmpi_cxx -lgfortran') + else: + targets.append('LIBS=-lm -lgfortran') elif '%cce' in self.spec: targets.append('COMPILER_SUITE=cray') elif '%intel' in self.spec: |