From 2ea336e6aa5c0a4c30ca7c302afa0f7b5f020df1 Mon Sep 17 00:00:00 2001 From: Scott McMillan Date: Wed, 20 Jan 2021 17:38:34 -0600 Subject: libevent: Remove compiler flags incompatible with NVIDIA HPC SDK (#21181) Co-authored-by: Scott McMillan --- var/spack/repos/builtin/packages/libevent/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/libevent/package.py b/var/spack/repos/builtin/packages/libevent/package.py index b3034bfe3f..a16e528acb 100644 --- a/var/spack/repos/builtin/packages/libevent/package.py +++ b/var/spack/repos/builtin/packages/libevent/package.py @@ -57,3 +57,15 @@ class Libevent(AutotoolsPackage): configure_args.append('--disable-openssl') return configure_args + + def patch(self): + if self.spec.satisfies('%nvhpc'): + # Remove incompatible compiler flags + filter_file(' -Wmissing-declarations', '', 'configure') + filter_file(' -Wbad-function-cast', '', 'configure') + filter_file(' -Wno-unused-parameter', '', 'configure') + filter_file(' -Wmissing-field-initializers', '', 'configure') + filter_file(' -Waddress', '', 'configure') + filter_file(' -Wnormalized=id', '', 'configure') + filter_file(' -Woverride-init', '', 'configure') + filter_file(' -Wlogical-op', '', 'configure') -- cgit v1.2.3-70-g09d2