minighost: rework link logic (#7402)

This commit is contained in:
Christoph Junghans 2018-03-06 15:51:12 -07:00 committed by GitHub
parent b0795d84c7
commit 360feb4193
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,9 +63,6 @@ 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')
elif '%cce' in self.spec:
targets.append('COMPILER_SUITE=cray')