e34063c5be
Since the bump of ccache from 4.7.4 to 4.8.2 in Buildroot commit
1db3f0f844
("package/ccache: bump
version to 4.8.2"), it started failing to build on machines that use
gcc 12.3, due to a bug in gcc:
/home/buildroot/autobuild/instance-0/output-1/build/host-ccache-4.8.2/src/storage/local/LocalStorage.cpp:701:24: required from here
/home/buildroot/autobuild/instance-0/output-1/build/host-ccache-4.8.2/src/Logging.hpp:33:7: internal compiler error: Segmentation fault
33 | Logging::log(std::string_view(message_)); \
| ^~~~~~~
Upstream ccache has committed a workaround to avoid this compiler bug,
which we backport in this commit.
Fixes:
http://autobuild.buildroot.net/results/cd341365d1c429bfca505a742e86b3090897db23/
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
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.
|
|
|
|
Upstream: https://github.com/ccache/ccache/commit/689168c292f1ed26c5f4a3070aeb649dad7facb5
|
|
|
|
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
|
---
|
|
src/storage/local/LocalStorage.cpp | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/storage/local/LocalStorage.cpp b/src/storage/local/LocalStorage.cpp
|
|
index 3e5abe5074..d0a904e553 100644
|
|
--- 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;
|
|
}
|
|
|