summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorDave Keeshan <96727608+davekeeshan@users.noreply.github.com>2023-11-27 13:33:30 +0000
committerGitHub <noreply@github.com>2023-11-27 14:33:30 +0100
commitb1b4ef6d1b7152e4a05f7d6eb6f5e577e266d229 (patch)
tree1cf9ec68855fc2f89fd2769a28893ade962e1633 /var
parentc564b2d9690935f1fa0ef13a4b84248f9c2d5348 (diff)
downloadspack-b1b4ef6d1b7152e4a05f7d6eb6f5e577e266d229.tar.gz
spack-b1b4ef6d1b7152e4a05f7d6eb6f5e577e266d229.tar.bz2
spack-b1b4ef6d1b7152e4a05f7d6eb6f5e577e266d229.tar.xz
spack-b1b4ef6d1b7152e4a05f7d6eb6f5e577e266d229.zip
Add patch so that ccache can compile with the standard gcc@12 version (#41249)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ccache/fix-gcc-12.patch23
-rw-r--r--var/spack/repos/builtin/packages/ccache/package.py2
2 files changed, 25 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ccache/fix-gcc-12.patch b/var/spack/repos/builtin/packages/ccache/fix-gcc-12.patch
new file mode 100644
index 0000000000..638d76a2c3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ccache/fix-gcc-12.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/906310
+https://bugs.gentoo.org/906942
+https://github.com/ccache/ccache/issues/1289
+https://github.com/ccache/ccache/commit/689168c292f1ed26c5f4a3070aeb649dad7facb5
+
+From 689168c292f1ed26c5f4a3070aeb649dad7facb5 Mon Sep 17 00:00:00 2001
+From: Joel Rosdahl <joel@rosdahl.net>
+Date: Tue, 1 Aug 2023 12:30:12 +0200
+Subject: [PATCH] fix: Work around GCC 12.3 bug 109241
+
+See also #1289.
+--- a/src/storage/local/LocalStorage.cpp
++++ b/src/storage/local/LocalStorage.cpp
+@@ -854,7 +854,9 @@ LocalStorage::recompress(const std::optional<int8_t> level,
+ auto l2_content_lock = get_level_2_content_lock(l1_index, l2_index);
+ l2_content_lock.make_long_lived(lock_manager);
+ if (!l2_content_lock.acquire()) {
+- LOG("Failed to acquire content lock for {}/{}", l1_index, l2_index);
++ // LOG_RAW+fmt::format instead of LOG due to GCC 12.3 bug #109241
++ LOG_RAW(fmt::format(
++ "Failed to acquire content lock for {}/{}", l1_index, l2_index));
+ return;
+ }
diff --git a/var/spack/repos/builtin/packages/ccache/package.py b/var/spack/repos/builtin/packages/ccache/package.py
index 06b1eb0968..0b3045a43a 100644
--- a/var/spack/repos/builtin/packages/ccache/package.py
+++ b/var/spack/repos/builtin/packages/ccache/package.py
@@ -72,6 +72,8 @@ class Ccache(CMakePackage):
conflicts("%clang@:7", when="@4.7:")
conflicts("%clang@:4", when="@4.4:")
+ patch("fix-gcc-12.patch", when="%gcc@12")
+
def cmake_args(self):
return [
self.define("ENABLE_TESTING", False),