diff mbox series

[meta-python] python3-grpcio-tools: Disable clang's musttail attribute on mips

Message ID 20220917021238.2777991-1-raj.khem@gmail.com
State New
Headers show
Series [meta-python] python3-grpcio-tools: Disable clang's musttail attribute on mips | expand

Commit Message

Khem Raj Sept. 17, 2022, 2:12 a.m. UTC
mips backend is not able to handle it in clang-15

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...f-Disable-musttail-attribute-on-mips.patch | 30 +++++++++++++++++++
 .../python/python3-grpcio-tools_1.48.1.bb     |  4 ++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch b/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch
new file mode 100644
index 0000000000..d19d1eee4c
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch
@@ -0,0 +1,30 @@ 
+From 64d737318656286f69ddc5ad654072785ddcbbed 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>
+---
+ third_party/protobuf/src/google/protobuf/port_def.inc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/third_party/protobuf/src/google/protobuf/port_def.inc b/third_party/protobuf/src/google/protobuf/port_def.inc
+index 37632cf..3c3c1e4 100644
+--- a/third_party/protobuf/src/google/protobuf/port_def.inc
++++ b/third_party/protobuf/src/google/protobuf/port_def.inc
+@@ -230,7 +230,8 @@
+ #error PROTOBUF_TAILCALL was previously defined
+ #endif
+ #if __has_cpp_attribute(clang::musttail) && \
+-  !defined(__arm__) && !defined(_ARCH_PPC) && !defined(__wasm__)
++  !defined(__arm__) && !defined(_ARCH_PPC) && !defined(__wasm__) && \
++  !defined(__mips__)
+ #  ifndef PROTO2_OPENSOURCE
+ // Compilation fails on ARM32: b/195943306
+ // Compilation fails on powerpc64le: b/187985113
+-- 
+2.37.3
+
diff --git a/meta-python/recipes-devtools/python/python3-grpcio-tools_1.48.1.bb b/meta-python/recipes-devtools/python/python3-grpcio-tools_1.48.1.bb
index d295429ae3..002211a8c1 100644
--- a/meta-python/recipes-devtools/python/python3-grpcio-tools_1.48.1.bb
+++ b/meta-python/recipes-devtools/python/python3-grpcio-tools_1.48.1.bb
@@ -9,7 +9,9 @@  inherit pypi setuptools3
 
 DEPENDS += "${PYTHON_PN}-grpcio"
 
-SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch"
+SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch \
+            file://0001-protobuf-Disable-musttail-attribute-on-mips.patch \
+            "
 SRC_URI[sha256sum] = "1178f2ea531f80cc2027ec64728df6ffc8e98cf1df61652a496eafd612127183"
 
 RDEPENDS:${PN} = "${PYTHON_PN}-grpcio"