summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-grpcio
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-03-15 09:18:24 -0700
committertgamblin <trevor.gamblin@windriver.com>2022-03-15 15:34:22 -0400
commitb9936f62abf48097edd231878c7137aeaa39518f (patch)
treef9360ff617c61a85637e9637f31a4f959978b555 /meta-python/recipes-devtools/python/python3-grpcio
parentf5a978bb7ed047537eb98306cf87704983907693 (diff)
downloadmeta-openembedded-b9936f62abf48097edd231878c7137aeaa39518f.tar.gz
python3-grpcio, python3-grpcio-tools: Upgrade to 1.44.0
- Fix build on ppc64le/musl - Add patch to fix abseil on ppc64 - Changes are here [1] [1] https://github.com/grpc/grpc/releases/tag/v1.44.0 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: tgamblin <trevor.gamblin@windriver.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-grpcio')
-rw-r--r--meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch17
-rw-r--r--meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch79
2 files changed, 84 insertions, 12 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch b/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
index 373669461..febe6c4c8 100644
--- a/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
+++ b/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
@@ -28,11 +28,9 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
28 src/python/grpcio/commands.py | 5 ++++- 28 src/python/grpcio/commands.py | 5 ++++-
29 2 files changed, 10 insertions(+), 4 deletions(-) 29 2 files changed, 10 insertions(+), 4 deletions(-)
30 30
31diff --git a/setup.py b/setup.py
32index 4b8c9d4..271b7b1 100644
33--- a/setup.py 31--- a/setup.py
34+++ b/setup.py 32+++ b/setup.py
35@@ -172,8 +172,11 @@ def check_linker_need_libatomic(): 33@@ -199,8 +199,11 @@ def check_linker_need_libatomic():
36 """Test if linker on system needs libatomic.""" 34 """Test if linker on system needs libatomic."""
37 code_test = (b'#include <atomic>\n' + 35 code_test = (b'#include <atomic>\n' +
38 b'int main() { return std::atomic<int64_t>{}; }') 36 b'int main() { return std::atomic<int64_t>{}; }')
@@ -46,20 +44,18 @@ index 4b8c9d4..271b7b1 100644
46 stdin=PIPE, 44 stdin=PIPE,
47 stdout=PIPE, 45 stdout=PIPE,
48 stderr=PIPE) 46 stderr=PIPE)
49@@ -183,7 +186,7 @@ def check_linker_need_libatomic(): 47@@ -210,7 +213,7 @@ def check_linker_need_libatomic():
50 # Double-check to see if -latomic actually can solve the problem. 48 # Double-check to see if -latomic actually can solve the problem.
51 # https://github.com/grpc/grpc/issues/22491 49 # https://github.com/grpc/grpc/issues/22491
52 cpp_test = subprocess.Popen( 50 cpp_test = subprocess.Popen(
53- [cxx, '-x', 'c++', '-std=c++11', '-latomic', '-'], 51- [cxx, '-x', 'c++', '-std=c++11', '-', '-latomic'],
54+ [cxx, cxx_args, '-x', 'c++', '-std=c++11', '-latomic', '-'], 52+ [cxx, cxx_args, '-x', 'c++', '-std=c++11', '-', '-latomic'],
55 stdin=PIPE, 53 stdin=PIPE,
56 stdout=PIPE, 54 stdout=PIPE,
57 stderr=PIPE) 55 stderr=PIPE)
58diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
59index a8b2ff5..b928201 100644
60--- a/src/python/grpcio/commands.py 56--- a/src/python/grpcio/commands.py
61+++ b/src/python/grpcio/commands.py 57+++ b/src/python/grpcio/commands.py
62@@ -219,7 +219,10 @@ class BuildExt(build_ext.build_ext): 58@@ -228,7 +228,10 @@ class BuildExt(build_ext.build_ext):
63 """ 59 """
64 try: 60 try:
65 # TODO(lidiz) Remove the generated a.out for success tests. 61 # TODO(lidiz) Remove the generated a.out for success tests.
@@ -71,6 +67,3 @@ index a8b2ff5..b928201 100644
71 stdin=subprocess.PIPE, 67 stdin=subprocess.PIPE,
72 stdout=subprocess.PIPE, 68 stdout=subprocess.PIPE,
73 stderr=subprocess.PIPE) 69 stderr=subprocess.PIPE)
74--
752.30.1
76
diff --git a/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch b/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch
new file mode 100644
index 000000000..e8048fe94
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch
@@ -0,0 +1,79 @@
1An all-in-one patch that fixes several issues:
2
31) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl)
42) powerpc stacktrace implementation only works on glibc (disabled on musl)
53) powerpc stacktrace implementation has ppc64 assumptions (fixed)
64) examine_stack.cpp makes glibc assumptions on powerpc (fixed)
7
8Sourced from void linux
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12--- a/absl/base/internal/unscaledcycleclock.cc
13+++ b/absl/base/internal/unscaledcycleclock.cc
14@@ -20,7 +20,7 @@
15 #include <intrin.h>
16 #endif
17
18-#if defined(__powerpc__) || defined(__ppc__)
19+#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
20 #ifdef __GLIBC__
21 #include <sys/platform/ppc.h>
22 #elif defined(__FreeBSD__)
23@@ -59,7 +59,7 @@ double UnscaledCycleClock::Frequency() {
24 return base_internal::NominalCPUFrequency();
25 }
26
27-#elif defined(__powerpc__) || defined(__ppc__)
28+#elif (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
29
30 int64_t UnscaledCycleClock::Now() {
31 #ifdef __GLIBC__
32--- a/absl/base/internal/unscaledcycleclock.h
33+++ b/absl/base/internal/unscaledcycleclock.h
34@@ -46,7 +46,8 @@
35
36 // The following platforms have an implementation of a hardware counter.
37 #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
38- defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \
39+ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \
40+ defined(__riscv) || \
41 defined(_M_IX86) || defined(_M_X64)
42 #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
43 #else
44--- a/absl/debugging/internal/examine_stack.cc
45+++ b/absl/debugging/internal/examine_stack.cc
46@@ -27,6 +27,10 @@
47 #include <csignal>
48 #include <cstdio>
49
50+#if defined(__powerpc__)
51+#include <asm/ptrace.h>
52+#endif
53+
54 #include "absl/base/attributes.h"
55 #include "absl/base/internal/raw_logging.h"
56 #include "absl/base/macros.h"
57@@ -63,8 +67,10 @@ void* GetProgramCounter(void* vuc) {
58 return reinterpret_cast<void*>(context->uc_mcontext.pc);
59 #elif defined(__powerpc64__)
60 return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]);
61-#elif defined(__powerpc__)
62+#elif defined(__powerpc__) && defined(__GLIBC__)
63 return reinterpret_cast<void*>(context->uc_mcontext.uc_regs->gregs[32]);
64+#elif defined(__powerpc__)
65+ return reinterpret_cast<void*>(((struct pt_regs *)context->uc_regs)->gregs[32]);
66 #elif defined(__riscv)
67 return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]);
68 #elif defined(__s390__) && !defined(__s390x__)
69--- a/absl/debugging/internal/stacktrace_config.h
70+++ b/absl/debugging/internal/stacktrace_config.h
71@@ -59,7 +59,7 @@
72 #elif defined(__i386__) || defined(__x86_64__)
73 #define ABSL_STACKTRACE_INL_HEADER \
74 "absl/debugging/internal/stacktrace_x86-inl.inc"
75-#elif defined(__ppc__) || defined(__PPC__)
76+#elif (defined(__ppc__) || defined(__PPC__)) && defined(__GLIBC__)
77 #define ABSL_STACKTRACE_INL_HEADER \
78 "absl/debugging/internal/stacktrace_powerpc-inl.inc"
79 #elif defined(__aarch64__)