diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index e205da71080..133d88fd987 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -172,5 +172,13 @@ def link_system_certs(self): os.rmdir(pkg_certs) os.symlink(sys_certs, pkg_certs) + def patch(self): + if self.spec.satisfies('%nvhpc'): + # Remove incompatible preprocessor flags + filter_file('-MF ', '', + 'Configurations/unix-Makefile.tmpl', string=True) + filter_file(r'-MT \$\@ ', '', + 'Configurations/unix-Makefile.tmpl', string=True) + def setup_build_environment(self, env): env.set('PERL', self.spec['perl'].prefix.bin.perl)