diff --git a/var/spack/repos/builtin/packages/veclibfort/package.py b/var/spack/repos/builtin/packages/veclibfort/package.py index 4a056803ca4..c02299d97c4 100644 --- a/var/spack/repos/builtin/packages/veclibfort/package.py +++ b/var/spack/repos/builtin/packages/veclibfort/package.py @@ -55,8 +55,16 @@ def install(self, spec, prefix): if sys.platform != 'darwin': raise InstallError('vecLibFort can be installed on macOS only') - make('all') - make('PREFIX=%s' % prefix, 'install') + filter_file(r'^PREFIX=.*', '', 'Makefile') + + make_args = [] + + if spec.satisfies('%gcc@6:'): + make_args += ['CFLAGS=-flax-vector-conversions'] + + make_args += ['PREFIX=%s' % prefix, 'install'] + + make(*make_args) # test fc = which('fc')