summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Thies <16190001+jthies@users.noreply.github.com>2021-10-05 10:33:41 +0200
committerGitHub <noreply@github.com>2021-10-05 08:33:41 +0000
commit7f2fd50d209be3d54673e45b148c63d5929b11bc (patch)
tree665aeeaeefc928f25af7ef242ce332e7a0aeb5c8
parent7ea9c75494af85d0dfb420ea6d0da4cd4a63317d (diff)
downloadspack-7f2fd50d209be3d54673e45b148c63d5929b11bc.tar.gz
spack-7f2fd50d209be3d54673e45b148c63d5929b11bc.tar.bz2
spack-7f2fd50d209be3d54673e45b148c63d5929b11bc.tar.xz
spack-7f2fd50d209be3d54673e45b148c63d5929b11bc.zip
phist: add a patch for the case +host arch=ppc64le (#26216)
-rw-r--r--var/spack/repos/builtin/packages/phist/package.py4
-rw-r--r--var/spack/repos/builtin/packages/phist/ppc64_sse.patch12
2 files changed, 15 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/phist/package.py b/var/spack/repos/builtin/packages/phist/package.py
index 0027e2ba4c..87ce1d2ae3 100644
--- a/var/spack/repos/builtin/packages/phist/package.py
+++ b/var/spack/repos/builtin/packages/phist/package.py
@@ -103,8 +103,10 @@ class Phist(CMakePackage):
# ###################### Patches ##########################
+ # resolve #22758: while SSE instructions are handled correctly, but a compile-time
+ # error will occur unless -DNO_WARN_X86_INTRINSICS is defined.
+ patch('ppc64_sse.patch', when='@1.7.4:1.9.4')
patch('update_tpetra_gotypes.patch', when='@:1.8')
-
patch('sbang.patch', when='+fortran')
# ###################### Dependencies ##########################
diff --git a/var/spack/repos/builtin/packages/phist/ppc64_sse.patch b/var/spack/repos/builtin/packages/phist/ppc64_sse.patch
new file mode 100644
index 0000000000..d4b59c8fe2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/phist/ppc64_sse.patch
@@ -0,0 +1,12 @@
+--- a/cmake/SetHostCompileFlag.cmake
++++ b/cmake/SetHostCompileFlag.cmake
+@@ -45,3 +45,9 @@ cmake_pop_check_state() # Recover variables
+ foreach (LANG C CXX Fortran)
+ set(CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS} ${${LANG}_ARCH_FLAG}")
+ endforeach()
++
++if(PHIST_HOST_OPTIMIZE)
++ if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
++ add_definitions(-DNO_WARN_X86_INTRINSICS)
++ endif()
++endif()