From 816f4f8b04eb71994a3bd2934e924f65b4c0c464 Mon Sep 17 00:00:00 2001 From: Gregory Lee Date: Thu, 8 Jun 2017 08:23:30 -0700 Subject: [PATCH] fix mfem build for ppc with gcc (#4452) --- .../repos/builtin/packages/mfem/mfem_ppc_build.patch | 10 ++++++++++ var/spack/repos/builtin/packages/mfem/package.py | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mfem/mfem_ppc_build.patch 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 ' +