numactl: enable building with pgi@20: (#23026)
This commit is contained in:
parent
e6de04d149
commit
06ca7f4f3e
@ -32,14 +32,21 @@ def autoreconf(self, spec, prefix):
|
|||||||
bash = which('bash')
|
bash = which('bash')
|
||||||
bash('./autogen.sh')
|
bash('./autogen.sh')
|
||||||
|
|
||||||
|
@when('%nvhpc')
|
||||||
def patch(self):
|
def patch(self):
|
||||||
|
self._nvhpc_patch()
|
||||||
|
|
||||||
|
@when('%pgi@20:')
|
||||||
|
def patch(self):
|
||||||
|
self._nvhpc_patch()
|
||||||
|
|
||||||
|
def _nvhpc_patch(self):
|
||||||
# Remove flags not recognized by the NVIDIA compiler
|
# Remove flags not recognized by the NVIDIA compiler
|
||||||
if self.spec.satisfies('%nvhpc'):
|
filter_file('-ffast-math -funroll-loops', '', 'Makefile.am')
|
||||||
filter_file('-ffast-math -funroll-loops', '', 'Makefile.am')
|
filter_file('-std=gnu99', '-c99', 'Makefile.am')
|
||||||
filter_file('-std=gnu99', '-c99', 'Makefile.am')
|
|
||||||
|
|
||||||
# Avoid undefined reference errors
|
# Avoid undefined reference errors
|
||||||
if self.spec.satisfies('@2.0.14 %nvhpc'):
|
if self.spec.satisfies('@2.0.14'):
|
||||||
filter_file('numa_sched_setaffinity_v1_int',
|
filter_file('numa_sched_setaffinity_v1_int',
|
||||||
'numa_sched_setaffinity_v1', 'libnuma.c')
|
'numa_sched_setaffinity_v1', 'libnuma.c')
|
||||||
filter_file('numa_sched_setaffinity_v2_int',
|
filter_file('numa_sched_setaffinity_v2_int',
|
||||||
|
Loading…
Reference in New Issue
Block a user