summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorOlivier Cessenat <cessenat@gmail.com>2021-02-22 10:50:25 +0100
committerGitHub <noreply@github.com>2021-02-22 10:50:25 +0100
commit074a6f224f17812b06a9e269d756aeb53c5d8a85 (patch)
treeb033659e6e53283d3446e49c57634bbcc1272bda /var
parent075bb3bb960b087f185f59d3251e8dca80d03106 (diff)
downloadspack-074a6f224f17812b06a9e269d756aeb53c5d8a85.tar.gz
spack-074a6f224f17812b06a9e269d756aeb53c5d8a85.tar.bz2
spack-074a6f224f17812b06a9e269d756aeb53c5d8a85.tar.xz
spack-074a6f224f17812b06a9e269d756aeb53c5d8a85.zip
harfbuzz: allows compilation standard being set properly for gcc (#21810)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/harfbuzz/package.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/harfbuzz/package.py b/var/spack/repos/builtin/packages/harfbuzz/package.py
index 149e7e1e5f..31a5068cfc 100644
--- a/var/spack/repos/builtin/packages/harfbuzz/package.py
+++ b/var/spack/repos/builtin/packages/harfbuzz/package.py
@@ -40,12 +40,21 @@ class Harfbuzz(AutotoolsPackage):
return url.format(version)
+ # Function borrowed from superlu
+ def flag_handler(self, name, flags):
+ flags = list(flags)
+ if name == 'cxxflags':
+ flags.append(self.compiler.cxx11_flag)
+ if name == 'cflags':
+ if '%pgi' not in self.spec and self.spec.satisfies('%gcc@:5.1'):
+ flags.append('-std=gnu99')
+ return (None, None, flags)
+
def configure_args(self):
args = []
# disable building of gtk-doc files following #9771
args.append('--disable-gtk-doc-html')
true = which('true')
- args.append('CXXFLAGS={0}'.format(self.compiler.cxx11_flag))
args.append('GTKDOC_CHECK={0}'.format(true))
args.append('GTKDOC_CHECK_PATH={0}'.format(true))
args.append('GTKDOC_MKPDF={0}'.format(true))