summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToyohisa Kameyama <kameyama@riken.jp>2020-10-07 22:54:07 +0900
committerGitHub <noreply@github.com>2020-10-07 08:54:07 -0500
commita12b03b8d4e5d24560677fecfef2832fad352d78 (patch)
treece0cd43c3441418fa4d02609fa6ebd0eadc8dd2d
parentf83bd360c6541f88102354dd958faeb8fadf1347 (diff)
downloadspack-a12b03b8d4e5d24560677fecfef2832fad352d78.tar.gz
spack-a12b03b8d4e5d24560677fecfef2832fad352d78.tar.bz2
spack-a12b03b8d4e5d24560677fecfef2832fad352d78.tar.xz
spack-a12b03b8d4e5d24560677fecfef2832fad352d78.zip
sollve: build on aarch64 (#19123)
-rw-r--r--var/spack/repos/builtin/packages/sollve/disable_unused_lock.patch27
-rw-r--r--var/spack/repos/builtin/packages/sollve/package.py9
2 files changed, 33 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/sollve/disable_unused_lock.patch b/var/spack/repos/builtin/packages/sollve/disable_unused_lock.patch
new file mode 100644
index 0000000000..3171ec670f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sollve/disable_unused_lock.patch
@@ -0,0 +1,27 @@
+commit 525b70302cea9b5850be9ee8d33b7660455082f2
+Author: Shintaro Iwasaki <siwasaki@anl.gov>
+Date: Wed Apr 15 03:46:44 2020 +0000
+
+ [BOLT] disable futex and adaptive locks if unused
+
+ On some architectures, including POWER 9, futex locks and/or adaptive locks are
+ not enabled by default, but BOLT assumed they are available, causing
+ compile-time errors on such a platform. This patch fixes it.
+
+diff --git a/runtime/src/kmp_lock.cpp b/runtime/src/kmp_lock.cpp
+index 5dcc4ee..5cda629 100644
+--- a/runtime/src/kmp_lock.cpp
++++ b/runtime/src/kmp_lock.cpp
+@@ -219,8 +219,12 @@ KMP_DEFINE_LOCKS(tas)
+ KMP_DEFINE_LOCKS(ticket)
+ KMP_DEFINE_LOCKS(queuing)
+ KMP_DEFINE_LOCKS(drdpa)
++#if KMP_USE_FUTEX
+ KMP_DEFINE_LOCKS(futex)
++#endif
++#if KMP_USE_ADAPTIVE_LOCKS
+ KMP_DEFINE_LOCKS(adaptive)
++#endif
+ typedef kmp_abt_mutex_lock_t kmp_hle_lock_t;
+ KMP_DEFINE_LOCKS(hle)
+ typedef kmp_abt_mutex_lock_t kmp_rtm_lock_t;
diff --git a/var/spack/repos/builtin/packages/sollve/package.py b/var/spack/repos/builtin/packages/sollve/package.py
index 3b605580be..c50eb85d7f 100644
--- a/var/spack/repos/builtin/packages/sollve/package.py
+++ b/var/spack/repos/builtin/packages/sollve/package.py
@@ -7,9 +7,10 @@ from spack import *
class Sollve(CMakePackage):
- """The SOLLVE Project aims at scaling OpenMP by leveraging LLVM for exascale
- performance and portability of applications. This package provides a
- collection of Clang/LLVM compilers and an OpenMP runtime library.
+ """The SOLLVE Project aims at scaling OpenMP by leveraging LLVM for
+ exascale performance and portability of applications. This package
+ provides a collection of Clang/LLVM compilers and an OpenMP runtime
+ library.
"""
homepage = 'https://www.bnl.gov/compsci/projects/SOLLVE/'
@@ -137,6 +138,8 @@ class Sollve(CMakePackage):
conflicts('%gcc@:5.0.999')
conflicts('+omp_tsan')
+ patch('disable_unused_lock.patch', when='@1.0a2', working_dir='projects/openmp')
+
@run_before('cmake')
def check_darwin_lldb_codesign_requirement(self):
if not self.spec.satisfies('+lldb platform=darwin'):