diff options
-rw-r--r-- | meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch | 13 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-grpcio-tools_1.44.0.bb (renamed from meta-python/recipes-devtools/python/python3-grpcio-tools_1.41.1.bb) | 7 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch | 17 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch | 79 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-grpcio_1.44.0.bb (renamed from meta-python/recipes-devtools/python/python3-grpcio_1.43.0.bb) | 6 |
5 files changed, 91 insertions, 31 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch b/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch index aef67b574..4713da174 100644 --- a/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch +++ b/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch | |||
@@ -26,11 +26,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
26 | setup.py | 9 ++++++--- | 26 | setup.py | 9 ++++++--- |
27 | 1 file changed, 6 insertions(+), 3 deletions(-) | 27 | 1 file changed, 6 insertions(+), 3 deletions(-) |
28 | 28 | ||
29 | diff --git a/setup.py b/setup.py | ||
30 | index a316038..70aa174 100644 | ||
31 | --- a/setup.py | 29 | --- a/setup.py |
32 | +++ b/setup.py | 30 | +++ b/setup.py |
33 | @@ -76,8 +76,11 @@ def check_linker_need_libatomic(): | 31 | @@ -87,8 +87,11 @@ def check_linker_need_libatomic(): |
34 | """Test if linker on system needs libatomic.""" | 32 | """Test if linker on system needs libatomic.""" |
35 | code_test = (b'#include <atomic>\n' + | 33 | code_test = (b'#include <atomic>\n' + |
36 | b'int main() { return std::atomic<int64_t>{}; }') | 34 | b'int main() { return std::atomic<int64_t>{}; }') |
@@ -44,15 +42,12 @@ index a316038..70aa174 100644 | |||
44 | stdin=PIPE, | 42 | stdin=PIPE, |
45 | stdout=PIPE, | 43 | stdout=PIPE, |
46 | stderr=PIPE) | 44 | stderr=PIPE) |
47 | @@ -87,7 +90,7 @@ def check_linker_need_libatomic(): | 45 | @@ -98,7 +101,7 @@ def check_linker_need_libatomic(): |
48 | # Double-check to see if -latomic actually can solve the problem. | 46 | # Double-check to see if -latomic actually can solve the problem. |
49 | # https://github.com/grpc/grpc/issues/22491 | 47 | # https://github.com/grpc/grpc/issues/22491 |
50 | cpp_test = subprocess.Popen( | 48 | cpp_test = subprocess.Popen( |
51 | - [cxx, '-x', 'c++', '-std=c++11', '-latomic', '-'], | 49 | - [cxx, '-x', 'c++', '-std=c++11', '-', '-latomic'], |
52 | + [cxx, cxx_args, '-x', 'c++', '-std=c++11', '-latomic', '-'], | 50 | + [cxx, cxx_args, '-x', 'c++', '-std=c++11', '-', '-latomic'], |
53 | stdin=PIPE, | 51 | stdin=PIPE, |
54 | stdout=PIPE, | 52 | stdout=PIPE, |
55 | stderr=PIPE) | 53 | stderr=PIPE) |
56 | -- | ||
57 | 2.30.1 | ||
58 | |||
diff --git a/meta-python/recipes-devtools/python/python3-grpcio-tools_1.41.1.bb b/meta-python/recipes-devtools/python/python3-grpcio-tools_1.44.0.bb index fdc4ad9cc..1b219fc95 100644 --- a/meta-python/recipes-devtools/python/python3-grpcio-tools_1.41.1.bb +++ b/meta-python/recipes-devtools/python/python3-grpcio-tools_1.44.0.bb | |||
@@ -10,13 +10,8 @@ inherit pypi setuptools3 | |||
10 | DEPENDS += "${PYTHON_PN}-grpcio" | 10 | DEPENDS += "${PYTHON_PN}-grpcio" |
11 | 11 | ||
12 | SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch" | 12 | SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch" |
13 | 13 | SRC_URI[sha256sum] = "be37f458ea510c9a8f1caabbc2b258d12e55d189a567f5edcace90f27dc0efbf" | |
14 | SRC_URI[sha256sum] = "f16e4c63996ca8fe0af1eb9c4a07e5207874c4a69f890ccb824cd858521d981f" | ||
15 | 14 | ||
16 | RDEPENDS:${PN} = "${PYTHON_PN}-grpcio" | 15 | RDEPENDS:${PN} = "${PYTHON_PN}-grpcio" |
17 | 16 | ||
18 | BBCLASSEXTEND = "native nativesdk" | 17 | BBCLASSEXTEND = "native nativesdk" |
19 | |||
20 | # Needs abseil-cpp which does not build for ppc64le/musl | ||
21 | COMPATIBLE_HOST:libc-musl:powerpc64le = "null" | ||
22 | |||
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 | ||
31 | diff --git a/setup.py b/setup.py | ||
32 | index 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) |
58 | diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py | ||
59 | index 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 | -- | ||
75 | 2.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 @@ | |||
1 | An all-in-one patch that fixes several issues: | ||
2 | |||
3 | 1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl) | ||
4 | 2) powerpc stacktrace implementation only works on glibc (disabled on musl) | ||
5 | 3) powerpc stacktrace implementation has ppc64 assumptions (fixed) | ||
6 | 4) examine_stack.cpp makes glibc assumptions on powerpc (fixed) | ||
7 | |||
8 | Sourced from void linux | ||
9 | |||
10 | Signed-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__) | ||
diff --git a/meta-python/recipes-devtools/python/python3-grpcio_1.43.0.bb b/meta-python/recipes-devtools/python/python3-grpcio_1.44.0.bb index 6d76967be..ffa009d7b 100644 --- a/meta-python/recipes-devtools/python/python3-grpcio_1.43.0.bb +++ b/meta-python/recipes-devtools/python/python3-grpcio_1.44.0.bb | |||
@@ -11,8 +11,9 @@ SRC_URI:append:class-target = " file://ppc-boringssl-support.patch \ | |||
11 | file://boring_ssl.patch \ | 11 | file://boring_ssl.patch \ |
12 | file://mips_bigendian.patch \ | 12 | file://mips_bigendian.patch \ |
13 | file://0001-absl-always-use-asm-sgidefs.h.patch \ | 13 | file://0001-absl-always-use-asm-sgidefs.h.patch \ |
14 | file://abseil-ppc-fixes.patch;patchdir=third_party/abseil-cpp \ | ||
14 | " | 15 | " |
15 | SRC_URI[sha256sum] = "735d9a437c262ab039d02defddcb9f8f545d7009ae61c0114e19dda3843febe5" | 16 | SRC_URI[sha256sum] = "4bae1c99896045d3062ab95478411c8d5a52cb84b91a1517312629fa6cfeb50e" |
16 | 17 | ||
17 | RDEPENDS:${PN} = "${PYTHON_PN}-protobuf \ | 18 | RDEPENDS:${PN} = "${PYTHON_PN}-protobuf \ |
18 | ${PYTHON_PN}-setuptools \ | 19 | ${PYTHON_PN}-setuptools \ |
@@ -43,6 +44,3 @@ CLEANBROKEN = "1" | |||
43 | BBCLASSEXTEND = "native nativesdk" | 44 | BBCLASSEXTEND = "native nativesdk" |
44 | 45 | ||
45 | CCACHE_DISABLE = "1" | 46 | CCACHE_DISABLE = "1" |
46 | |||
47 | # needs vdso support | ||
48 | COMPATIBLE_HOST:libc-musl:powerpc64le = "null" | ||