From 3bb64b600a2dd18b55a8fe2ea030e8098d21fe46 Mon Sep 17 00:00:00 2001 From: miller86 Date: Mon, 19 Jun 2017 15:25:39 -0700 Subject: [PATCH] fixing build issues for gcc on osx --- .../repos/builtin/packages/veclibfort/package.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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')