libevent: Remove compiler flags incompatible with NVIDIA HPC SDK (#21181)

Co-authored-by: Scott McMillan <smcmillan@nvidia.com>
This commit is contained in:
Scott McMillan 2021-01-20 17:38:34 -06:00 committed by GitHub
parent 6ecc3fc06f
commit 2ea336e6aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,3 +57,15 @@ def configure_args(self):
configure_args.append('--disable-openssl') configure_args.append('--disable-openssl')
return configure_args 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')