diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 7b89028820..8faeff76e5 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -205,6 +205,9 @@ def install(self, spec, prefix): '--download-c2html=0', '--download-sowing=0', '--download-hwloc=0', + 'CFLAGS=%s' % ' '.join(spec.compiler_flags['cflags']), + 'FFLAGS=%s' % ' '.join(spec.compiler_flags['fflags']), + 'CXXFLAGS=%s' % ' '.join(spec.compiler_flags['cxxflags']), 'COPTFLAGS=', 'FOPTFLAGS=', 'CXXOPTFLAGS=']