summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/sz/fix_optimization.patch11
-rw-r--r--var/spack/repos/builtin/packages/sz/package.py4
2 files changed, 15 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/sz/fix_optimization.patch b/var/spack/repos/builtin/packages/sz/fix_optimization.patch
new file mode 100644
index 0000000000..208a7791ee
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sz/fix_optimization.patch
@@ -0,0 +1,11 @@
+--- spack-src/configure.org 2019-12-05 10:58:07.408584611 +0900
++++ spack-src/configure 2019-12-05 10:58:29.670909716 +0900
+@@ -3019,7 +3019,7 @@
+
+
+ # Checks for programs.
+-: ${CFLAGS=-O3 -std=c99 -Wall}
++: ${CFLAGS=-O2 -std=c99 -Wall}
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
diff --git a/var/spack/repos/builtin/packages/sz/package.py b/var/spack/repos/builtin/packages/sz/package.py
index 3924e0525f..68a206c153 100644
--- a/var/spack/repos/builtin/packages/sz/package.py
+++ b/var/spack/repos/builtin/packages/sz/package.py
@@ -35,6 +35,10 @@ class Sz(AutotoolsPackage):
variant('fortran', default=False,
description='Enable fortran compilation')
+ # Part of latest sources don't support -O3 optimization
+ # with Fujitsu compiler.
+ patch('fix_optimization.patch', when='@2.0.2.0:%fj')
+
def configure_args(self):
args = []
if '+fortran' in self.spec: