diff options
author | Matthieu Dorier <mdorier@anl.gov> | 2022-05-25 00:58:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-24 16:58:35 -0700 |
commit | ad506ac2a83d947c3df4e37c44a3d516084b055f (patch) | |
tree | caa20cc047f6b40b8745c05d743fbad8f6a7f9e5 | |
parent | 806521b4a0ae1296f723e7ceec46e2b57ed7a682 (diff) | |
download | spack-ad506ac2a83d947c3df4e37c44a3d516084b055f.tar.gz spack-ad506ac2a83d947c3df4e37c44a3d516084b055f.tar.bz2 spack-ad506ac2a83d947c3df4e37c44a3d516084b055f.tar.xz spack-ad506ac2a83d947c3df4e37c44a3d516084b055f.zip |
[leveldb] add patch to fix check for -Wthread-safety (#30810)
-rw-r--r-- | var/spack/repos/builtin/packages/leveldb/0001-fix-check-for-Wthread-safety.patch | 25 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/leveldb/package.py | 2 |
2 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/leveldb/0001-fix-check-for-Wthread-safety.patch b/var/spack/repos/builtin/packages/leveldb/0001-fix-check-for-Wthread-safety.patch new file mode 100644 index 0000000000..d76d4c7d3c --- /dev/null +++ b/var/spack/repos/builtin/packages/leveldb/0001-fix-check-for-Wthread-safety.patch @@ -0,0 +1,25 @@ +From cf69e762384b259ea3890274779db0ae1bb51fa6 Mon Sep 17 00:00:00 2001 +From: Matthieu Dorier <mdorier@anl.gov> +Date: Tue, 24 May 2022 16:28:43 +0000 +Subject: [PATCH] fix check for -Wthread-safety + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1409c06..416978f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -54,7 +54,7 @@ include(CheckCXXSourceCompiles) + # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html + # -Werror is necessary because unknown attributes only generate warnings. + set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) +-list(APPEND CMAKE_REQUIRED_FLAGS -Werror -Wthread-safety) ++set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror -Wthread-safety") + check_cxx_source_compiles(" + struct __attribute__((lockable)) Lock { + void Acquire() __attribute__((exclusive_lock_function())); +-- +2.30.2 + diff --git a/var/spack/repos/builtin/packages/leveldb/package.py b/var/spack/repos/builtin/packages/leveldb/package.py index f5cbf03c50..23efb3d4fe 100644 --- a/var/spack/repos/builtin/packages/leveldb/package.py +++ b/var/spack/repos/builtin/packages/leveldb/package.py @@ -24,6 +24,8 @@ class Leveldb(CMakePackage): depends_on('snappy') + patch('0001-fix-check-for-Wthread-safety.patch', when='@1.22') + def url_for_version(self, version): url = 'https://github.com/google/leveldb/archive/{0}.tar.gz' |