summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGregory Lee <lee218@llnl.gov>2017-06-08 08:23:30 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2017-06-08 10:23:30 -0500
commit816f4f8b04eb71994a3bd2934e924f65b4c0c464 (patch)
tree04d163517d450d8a75e93901e2758c91a31963d3 /var
parent4e928119394d5a4efb07c2f22df967f84dd052c4 (diff)
downloadspack-816f4f8b04eb71994a3bd2934e924f65b4c0c464.tar.gz
spack-816f4f8b04eb71994a3bd2934e924f65b4c0c464.tar.bz2
spack-816f4f8b04eb71994a3bd2934e924f65b4c0c464.tar.xz
spack-816f4f8b04eb71994a3bd2934e924f65b4c0c464.zip
fix mfem build for ppc with gcc (#4452)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/mfem/mfem_ppc_build.patch10
-rw-r--r--var/spack/repos/builtin/packages/mfem/package.py2
2 files changed, 12 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mfem/mfem_ppc_build.patch b/var/spack/repos/builtin/packages/mfem/mfem_ppc_build.patch
new file mode 100644
index 0000000000..b403683105
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mfem/mfem_ppc_build.patch
@@ -0,0 +1,10 @@
+--- mfem/miniapps/performance/makefile 2017-06-07 13:51:29.366596901 -0700
++++ mfem/miniapps/performance/makefile.new 2017-06-07 13:51:57.087104178 -0700
+@@ -26,7 +26,6 @@
+ # Compiler specific optimizations.
+ # For best performance, GCC 5 (or newer) is recommended.
+ ifneq (,$(findstring $(MFEM_CXX),g++ mpicxx))
+- MFEM_CXXFLAGS += -march=native
+ # MFEM_CXXFLAGS += -std=c++03
+ MFEM_CXXFLAGS += -std=c++11
+ MFEM_CXXFLAGS += -pedantic -Wall
diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py
index a2d6bdc7ff..8f6f3a7855 100644
--- a/var/spack/repos/builtin/packages/mfem/package.py
+++ b/var/spack/repos/builtin/packages/mfem/package.py
@@ -96,6 +96,8 @@ class Mfem(Package):
depends_on('zlib', when='@3.2: +netcdf')
depends_on('hdf5', when='@3.2: +netcdf')
+ patch('mfem_ppc_build.patch', when='@3.2:3.3 arch=ppc64le')
+
def check_variants(self, spec):
if '+mpi' in spec and ('+hypre' not in spec or '+metis' not in spec):
raise InstallError('mfem+mpi must be built with +hypre ' +