summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/bzip2
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2017-02-18 16:42:45 -0600
committerGitHub <noreply@github.com>2017-02-18 16:42:45 -0600
commit4397ce8118a44fae4bef2b2ddcdfa3377922563f (patch)
treec0a5120576036aecc6df0e28efd87254a6fd1f46 /var/spack/repos/builtin/packages/bzip2
parent341b78a96dbdebf8a2e7a353c993a04f001d9e71 (diff)
downloadspack-4397ce8118a44fae4bef2b2ddcdfa3377922563f.tar.gz
spack-4397ce8118a44fae4bef2b2ddcdfa3377922563f.tar.bz2
spack-4397ce8118a44fae4bef2b2ddcdfa3377922563f.tar.xz
spack-4397ce8118a44fae4bef2b2ddcdfa3377922563f.zip
Replace GCC-specific warning flags with valid PGI flags (#3137)
Diffstat (limited to 'var/spack/repos/builtin/packages/bzip2')
-rw-r--r--var/spack/repos/builtin/packages/bzip2/package.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py
index d12b88e734..e4b2463784 100644
--- a/var/spack/repos/builtin/packages/bzip2/package.py
+++ b/var/spack/repos/builtin/packages/bzip2/package.py
@@ -36,6 +36,7 @@ class Bzip2(Package):
url = "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz"
version('1.0.6', '00b516f4704d4a7cb50a1d97e6e8e15b')
+
variant('shared', default=True, description='Enables the build of shared libraries.')
def patch(self):
@@ -44,6 +45,11 @@ class Bzip2(Package):
filter_file(r'^CC=gcc', 'CC=cc', 'Makefile')
filter_file(r'^CC=gcc', 'CC=cc', 'Makefile-libbz2_so')
+ # The Makefiles use GCC flags that are incompatible with PGI
+ if self.compiler.name == 'pgi':
+ filter_file('-Wall -Winline', '-Minform=inform', 'Makefile')
+ filter_file('-Wall -Winline', '-Minform=inform', 'Makefile-libbz2_so') # noqa
+
# Patch the link line to use RPATHs on macOS
if 'darwin' in self.spec.architecture:
v = self.spec.version