From 668d3e577073e51cc7e98b42d89c1e2b9b4e04b4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 16 Sep 2022 19:09:15 -0700
Subject: [PATCH] protobuf: Disable musttail attribute on mips

See https://github.com/llvm/llvm-project/issues/57795

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
---
 third_party/protobuf/src/google/protobuf/port_def.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/third_party/protobuf/src/google/protobuf/port_def.inc b/third_party/protobuf/src/google/protobuf/port_def.inc
index edd6d51..6ddaf80 100644
--- a/third_party/protobuf/src/google/protobuf/port_def.inc
+++ b/third_party/protobuf/src/google/protobuf/port_def.inc
@@ -235,6 +235,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
 #error PROTOBUF_TAILCALL was previously defined
 #endif
 #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) &&  \
+    !defined(__mips__) &&                                             \
     !defined(_ARCH_PPC) && !defined(__wasm__) &&                      \
     !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__)
 // Compilation fails on ARM32: b/195943306
