[packages/protobuf] - upstream fix for error: cannot tail-call: target is not able to optimize the call into a sibling c

hawk hawk at pld-linux.org
Wed Aug 27 16:37:24 CEST 2025


commit 95073e1ed3e6f2bccd9031bb0af05bf15f6da51f
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Wed Aug 27 14:36:55 2025 +0000

    - upstream fix for error: cannot tail-call: target is not able to optimize the call into a sibling call

 musttail.patch | 14 ++++++++++++++
 protobuf.spec  |  2 ++
 2 files changed, 16 insertions(+)
---
diff --git a/protobuf.spec b/protobuf.spec
index 62c0e38..323aa94 100644
--- a/protobuf.spec
+++ b/protobuf.spec
@@ -25,6 +25,7 @@ Patch0:		system-gtest.patch
 Patch1:		no-wrap-memcpy.patch
 Patch2:		%{name}-x32.patch
 Patch3:		%{name}-32bit.patch
+Patch4:		musttail.patch
 URL:		https://github.com/google/protobuf/
 BuildRequires:	autoconf >= 2.59
 BuildRequires:	automake >= 1:1.11
@@ -211,6 +212,7 @@ buforów protokołowych (Protocol Buffers).
 #%ifnarch %{x8664} aarch64 alpha ia64 mips64 ppc64 s390x sparc64
 %patch -P 3 -p1
 #%endif
+%patch -P 4 -p1
 
 %{__mv} utf8_range-* third_party/utf8_range
 
diff --git a/musttail.patch b/musttail.patch
new file mode 100644
index 0000000..b8f65c3
--- /dev/null
+++ b/musttail.patch
@@ -0,0 +1,14 @@
+--- protobuf-3.20.3/src/google/protobuf/port_def.inc	2022-09-29 21:09:51.000000000 +0000
++++ protobuf-3.20.3/src/google/protobuf/port_def.inc	2025-08-27 14:16:29.721253876 +0000
+@@ -233,9 +233,8 @@
+ #ifdef PROTOBUF_TAILCALL
+ #error PROTOBUF_TAILCALL was previously defined
+ #endif
+-#if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \
+-    !defined(_ARCH_PPC) && !defined(__wasm__) &&                 \
+-    !(defined(_MSC_VER) && defined(_M_IX86))
++#if __has_cpp_attribute(clang::musttail) && (defined(__aarch64__) || \
++    defined(__x86_64__) || defined(_M_X64))
+ #  ifndef PROTO2_OPENSOURCE
+ // Compilation fails on ARM32: b/195943306
+ // Compilation fails on powerpc64le: b/187985113
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/protobuf.git/commitdiff/95073e1ed3e6f2bccd9031bb0af05bf15f6da51f



More information about the pld-cvs-commit mailing list