summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/lz4/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/lz4/package.py')
-rw-r--r--var/spack/repos/builtin/packages/lz4/package.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/lz4/package.py b/var/spack/repos/builtin/packages/lz4/package.py
index 86b5d112bc..181117e0e2 100644
--- a/var/spack/repos/builtin/packages/lz4/package.py
+++ b/var/spack/repos/builtin/packages/lz4/package.py
@@ -34,14 +34,27 @@ class Lz4(MakefilePackage):
return "{0}/r{1}.tar.gz".format(url, version.joined)
def build(self, spec, prefix):
+ par = True
+ if spec.compiler.name == 'nvhpc':
+ # relocation error when building shared and dynamic libs in
+ # parallel
+ par = False
+
if sys.platform != "darwin":
- make('MOREFLAGS=-lrt') # fixes make error on CentOS6
+ make('MOREFLAGS=-lrt', parallel=par) # fixes make error on CentOS6
else:
- make()
+ make(parallel=par)
def install(self, spec, prefix):
make('install', 'PREFIX={0}'.format(prefix))
+ def patch(self):
+ # Remove flags not recognized by the NVIDIA compiler
+ if self.spec.satisfies('%nvhpc'):
+ filter_file('-fvisibility=hidden', '', 'Makefile')
+ filter_file('-fvisibility=hidden', '', 'lib/Makefile')
+ filter_file('-pedantic', '', 'Makefile')
+
@run_after('install')
def darwin_fix(self):
if sys.platform == 'darwin':