diff --git a/var/spack/repos/builtin/packages/minighost/package.py b/var/spack/repos/builtin/packages/minighost/package.py index 0a258cc0dd..1ad8b9f3f4 100644 --- a/var/spack/repos/builtin/packages/minighost/package.py +++ b/var/spack/repos/builtin/packages/minighost/package.py @@ -54,7 +54,8 @@ def build_targets(self): if '+mpi' in self.spec: targets.append('PROTOCOL=-D_MG_MPI') targets.append('FC={0}'.format(self.spec['mpi'].mpif77)) - targets.append('CC={0}'.format(self.spec['mpi'].mpicc)) + # CC is only used for linking, use it to pull in the right f77 libs + targets.append('CC={0}'.format(self.spec['mpi'].mpif77)) else: targets.append('PROTOCOL=-D_MG_SERIAL') targets.append('FC=f77') @@ -62,10 +63,7 @@ def build_targets(self): if '%gcc' in self.spec: targets.append('COMPILER_SUITE=gnu') - if '+mpi' in self.spec: - targets.append('LIBS=-lm -lmpi_f77 -lmpi -lgfortran') - else: - targets.append('LIBS=-lm -lgfortran') + targets.append('LIBS=-lm -lgfortran') elif '%cce' in self.spec: targets.append('COMPILER_SUITE=cray') elif '%intel' in self.spec: