minighost: fix build on Ubuntu (#7354)

* minighost: fix build on Ubuntu

* minighost: append -lgfortran only for gcc
This commit is contained in:
Christoph Junghans 2018-02-28 10:37:01 -07:00 committed by Todd Gamblin
parent 6c2fe27f41
commit 3089207ced

View file

@ -55,16 +55,17 @@ def build_targets(self):
targets.append('PROTOCOL=-D_MG_MPI') targets.append('PROTOCOL=-D_MG_MPI')
targets.append('FC={0}'.format(self.spec['mpi'].mpif77)) targets.append('FC={0}'.format(self.spec['mpi'].mpif77))
targets.append('CC={0}'.format(self.spec['mpi'].mpicc)) targets.append('CC={0}'.format(self.spec['mpi'].mpicc))
targets.append(
'LIBS=-lm -lmpi_cxx')
else: else:
targets.append('PROTOCOL=-D_MG_SERIAL') targets.append('PROTOCOL=-D_MG_SERIAL')
targets.append('FC=f77') targets.append('FC=f77')
targets.append('CC=cc') targets.append('CC=cc')
targets.append('LIBS=-lm -lgfortran')
if '%gcc' in self.spec: if '%gcc' in self.spec:
targets.append('COMPILER_SUITE=gnu') 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: elif '%cce' in self.spec:
targets.append('COMPILER_SUITE=cray') targets.append('COMPILER_SUITE=cray')
elif '%intel' in self.spec: elif '%intel' in self.spec: