diff mbox series

[1/1] package/ccache: fix build with gcc 12.3

Message ID 20230801215958.1751367-1-bernd@kuhls.net
State Accepted
Headers show
Series [1/1] package/ccache: fix build with gcc 12.3 | expand

Commit Message

Bernd Kuhls Aug. 1, 2023, 9:59 p.m. UTC
Fixes:
http://autobuild.buildroot.net/results/cd3/cd341365d1c429bfca505a742e86b3090897db23/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 ...-fix-Work-around-GCC-12.3-bug-109241.patch | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/ccache/0001-fix-Work-around-GCC-12.3-bug-109241.patch

Comments

Thomas Petazzoni Aug. 6, 2023, 12:25 p.m. UTC | #1
Hello Bernd,

On Tue,  1 Aug 2023 23:59:58 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:

> Fixes:
> http://autobuild.buildroot.net/results/cd3/cd341365d1c429bfca505a742e86b3090897db23/
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> ---
>  ...-fix-Work-around-GCC-12.3-bug-109241.patch | 29 +++++++++++++++++++
>  1 file changed, 29 insertions(+)
>  create mode 100644 package/ccache/0001-fix-Work-around-GCC-12.3-bug-109241.patch

You forgot to explain in the commit message when this issue started
occurring. So I've added an explanation in the commit message:

  https://gitlab.com/buildroot.org/buildroot/-/commit/e34063c5be6963cb3fd87e6852af0854ec1c2dc1

It would be *really* nice if you could do something like this on a
systematic fashion.

Applied to master with this change, of course.

Thanks a lot!

Thomas
diff mbox series

Patch

diff --git a/package/ccache/0001-fix-Work-around-GCC-12.3-bug-109241.patch b/package/ccache/0001-fix-Work-around-GCC-12.3-bug-109241.patch
new file mode 100644
index 0000000000..42872597cd
--- /dev/null
+++ b/package/ccache/0001-fix-Work-around-GCC-12.3-bug-109241.patch
@@ -0,0 +1,29 @@ 
+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;
+           }
+