From 592df25aefc3a57f8a77a4e75d1f9c3eb957d5ab Mon Sep 17 00:00:00 2001
From: Gregory Lee <lee218@llnl.gov>
Date: Sat, 17 Dec 2016 17:04:59 -0800
Subject: [PATCH] build fixes for openblas (#2601)

* build fixes for openblas

* avx2 in openblas nnot supported with older gcc

* merge fix for openblas
---
 var/spack/repos/builtin/packages/openblas/package.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index 86ac38f3b3..d5a70f077b 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -55,6 +55,8 @@ class Openblas(MakefilePackage):
     #  https://github.com/xianyi/OpenBLAS/pull/915
     patch('openblas_icc.patch', when='%intel')
 
+    parallel = False
+
     @property
     def blas_libs(self):
         shared = True if '+shared' in self.spec else False
@@ -90,11 +92,14 @@ def make_defs(self):
         # When mixing compilers make sure that
         # $SPACK_ROOT/lib/spack/env/<compiler> have symlinks with reasonable
         # names and hack them inside lib/spack/spack/compilers/<compiler>.py
+
         make_defs = [
             'CC={0}'.format(spack_cc),
             'FC={0}'.format(spack_f77),
             'MAKE_NO_J=1'
         ]
+        if self.spec.satisfies('%gcc@:4.8.4'):
+            make_defs += ['NO_AVX2=1']
         if '~shared' in self.spec:
             if '+pic' in self.spec:
                 make_defs.extend([
-- 
GitLab