summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio')
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-Include-missing-cstdint-header.patch29
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-crypto-use-_Generic-only-if-defined-__cplusplus.patch73
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-python-enable-unbundled-cross-compilation.patch49
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-target.h-define-proper-macro-for-ppc-ppc64.patch34
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch24
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch102
6 files changed, 49 insertions, 262 deletions
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-Include-missing-cstdint-header.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-Include-missing-cstdint-header.patch
deleted file mode 100644
index a2bd294a01..0000000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-Include-missing-cstdint-header.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 0760579b4890b48ea3ab36e48f1f6fb3e7ed05f5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 30 Jan 2023 10:31:10 -0800
-Subject: [PATCH] Include missing <cstdint> header
-
-gcc 13 moved some includes around and as a result <cstdint> is
-no longer transitively included [1]. Explicitly include it for
-int32_t.
-
-[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
-
-Upstream-Status: Submitted [https://code-review.googlesource.com/c/re2/+/60970]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- third_party/re2/util/pcre.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/third_party/re2/util/pcre.h b/third_party/re2/util/pcre.h
-index 896b0bd..271a005 100644
---- a/third_party/re2/util/pcre.h
-+++ b/third_party/re2/util/pcre.h
-@@ -163,6 +163,7 @@
-
- #include "util/util.h"
- #include "re2/stringpiece.h"
-+#include <cstdint>
-
- #ifdef USEPCRE
- #include <pcre.h>
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-crypto-use-_Generic-only-if-defined-__cplusplus.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-crypto-use-_Generic-only-if-defined-__cplusplus.patch
deleted file mode 100644
index 790ccccc95..0000000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-crypto-use-_Generic-only-if-defined-__cplusplus.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From eee5daeb5b53b0c4a013aa5887a726434ec81600 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <martin.jansa@gmail.com>
-Date: Mon, 6 May 2024 01:36:39 +0200
-Subject: [PATCH] crypto: use _Generic only if !defined(__cplusplus)
-
-* fixes build with gcc-14 which has __builtin_addc and __builtin_subc
- with gcc-13 it was already using the #else branch because of missing builtins
-
-* fixes
- https://github.com/grpc/grpc/issues/35945
-
-* _Generic was introduced in boringssl with:
- https://boringssl.googlesource.com/boringssl/+/70ca6bc24be103dabd68e448cd3af29b929b771d%5E%21/#F4
-
-* but e.g. third_party/boringssl-with-bazel/src/ssl/d1_both.cc includes
- this internal.h and from the .cc extension gcc will process it as C++
- where _Generic isn't available, causing:
-
-In file included from third_party/boringssl-with-bazel/src/ssl/d1_both.cc:125:
-third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h: In function 'uint32_t CRYPTO_addc_u32(uint32_t, uint32_t, uint32_t, uint32_t*)':
-third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1159:7: error: expected primary-expression before 'unsigned'
- 1159 | unsigned: __builtin_addc, \
- | ^~~~~~~~
-third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1166:10: note: in expansion of macro 'CRYPTO_GENERIC_ADDC'
- 1166 | return CRYPTO_GENERIC_ADDC(x, y, carry, out_carry);
- | ^~~~~~~~~~~~~~~~~~~
-third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1160:7: error: expected primary-expression before 'unsigned'
- 1160 | unsigned long: __builtin_addcl, \
- | ^~~~~~~~
-third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1166:10: note: in expansion of macro 'CRYPTO_GENERIC_ADDC'
- 1166 | return CRYPTO_GENERIC_ADDC(x, y, carry, out_carry);
- | ^~~~~~~~~~~~~~~~~~~
-third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1161:7: error: expected primary-expression before 'unsigned'
- 1161 | unsigned long long: __builtin_addcll))((x), (y), (carry), (out_carry))
- | ^~~~~~~~
-third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1166:10: note: in expansion of macro 'CRYPTO_GENERIC_ADDC'
- 1166 | return CRYPTO_GENERIC_ADDC(x, y, carry, out_carry);
- | ^~~~~~~~~~~~~~~~~~~
-third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1158:4: error: '_Generic' was not declared in this scope
- 1158 | (_Generic((x), \
- | ^~~~~~~~
-third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1166:10: note: in expansion of macro 'CRYPTO_GENERIC_ADDC'
- 1166 | return CRYPTO_GENERIC_ADDC(x, y, carry, out_carry);
- | ^~~~~~~~~~~~~~~~~~~
-
-Upstream-Status: Submitted [https://boringssl-review.googlesource.com/c/boringssl/+/68227 crypto: use _Generic only if !defined(__cplusplus)]
-Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
----
- crypto/internal.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/crypto/internal.h b/crypto/internal.h
-index f93c2e5..2fca2fb 100644
---- a/crypto/internal.h
-+++ b/crypto/internal.h
-@@ -1206,7 +1206,7 @@ static inline uint64_t CRYPTO_rotr_u64(uint64_t value, int shift) {
-
- // CRYPTO_addc_* returns |x + y + carry|, and sets |*out_carry| to the carry
- // bit. |carry| must be zero or one.
--#if OPENSSL_HAS_BUILTIN(__builtin_addc)
-+#if OPENSSL_HAS_BUILTIN(__builtin_addc) && !defined(__cplusplus)
-
- #define CRYPTO_GENERIC_ADDC(x, y, carry, out_carry) \
- (_Generic((x), \
-@@ -1258,7 +1258,7 @@ static inline uint64_t CRYPTO_addc_u64(uint64_t x, uint64_t y, uint64_t carry,
-
- // CRYPTO_subc_* returns |x - y - borrow|, and sets |*out_borrow| to the borrow
- // bit. |borrow| must be zero or one.
--#if OPENSSL_HAS_BUILTIN(__builtin_subc)
-+#if OPENSSL_HAS_BUILTIN(__builtin_subc) && !defined(__cplusplus)
-
- #define CRYPTO_GENERIC_SUBC(x, y, borrow, out_borrow) \
- (_Generic((x), \
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-python-enable-unbundled-cross-compilation.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-python-enable-unbundled-cross-compilation.patch
new file mode 100644
index 0000000000..782b348815
--- /dev/null
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-python-enable-unbundled-cross-compilation.patch
@@ -0,0 +1,49 @@
+From ff01ac8908a7267503ffbb85efd24755da0502d8 Mon Sep 17 00:00:00 2001
+From: Peter Marko <peter.marko@siemens.com>
+Date: Wed, 5 Feb 2025 21:06:50 +0100
+Subject: [PATCH] python: enable unbundled cross compilation
+
+System headers are on a sysroot path provided by the toolchain
+options.
+
+Upstream-Status: Pending
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ setup.py | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 3b6edbe..d3a0d04 100644
+--- a/setup.py
++++ b/setup.py
+@@ -317,25 +317,25 @@ if BUILD_WITH_SYSTEM_OPENSSL:
+ lambda x: "third_party/boringssl" not in x, CORE_C_FILES
+ )
+ CORE_C_FILES = filter(lambda x: "src/boringssl" not in x, CORE_C_FILES)
+- SSL_INCLUDE = (os.path.join("/usr", "include", "openssl"),)
++ SSL_INCLUDE = ()
+
+ if BUILD_WITH_SYSTEM_ZLIB:
+ CORE_C_FILES = filter(lambda x: "third_party/zlib" not in x, CORE_C_FILES)
+- ZLIB_INCLUDE = (os.path.join("/usr", "include"),)
++ ZLIB_INCLUDE = ()
+
+ if BUILD_WITH_SYSTEM_CARES:
+ CORE_C_FILES = filter(lambda x: "third_party/cares" not in x, CORE_C_FILES)
+- CARES_INCLUDE = (os.path.join("/usr", "include"),)
++ CARES_INCLUDE = ()
+
+ if BUILD_WITH_SYSTEM_RE2:
+ CORE_C_FILES = filter(lambda x: "third_party/re2" not in x, CORE_C_FILES)
+- RE2_INCLUDE = (os.path.join("/usr", "include", "re2"),)
++ RE2_INCLUDE = ()
+
+ if BUILD_WITH_SYSTEM_ABSL:
+ CORE_C_FILES = filter(
+ lambda x: "third_party/abseil-cpp" not in x, CORE_C_FILES
+ )
+- ABSL_INCLUDE = (os.path.join("/usr", "include"),)
++ ABSL_INCLUDE = ()
+
+ EXTENSION_INCLUDE_DIRECTORIES = (
+ (PYTHON_STEM,)
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-target.h-define-proper-macro-for-ppc-ppc64.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-target.h-define-proper-macro-for-ppc-ppc64.patch
deleted file mode 100644
index 39f9fafba7..0000000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-target.h-define-proper-macro-for-ppc-ppc64.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From e2c78c555ab3d9509c4ade511e2f711eb7188626 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Wed, 15 May 2024 16:55:09 +0800
-Subject: [PATCH] target.h: define proper macro for ppc/ppc64
-
-Fix error:
-third_party/boringssl-with-bazel/src/include/openssl/target.h:74:2: error: #error "Unknown target CPU"
-third_party/boringssl-with-bazel/src/include/openssl/bn.h:172:2: error: #error "Must define either OPENSSL_32_BIT or OPENSSL_64_BIT"
-third_party/boringssl-with-bazel/src/include/openssl/bn.h:230:44: error: 'BN_ULONG' has not been declared
-
-BN_ULONG will be defined after set proper OPENSSL_32_BIT or OPENSSL_64_BIT
-
-Upstream-Status: Pending
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- third_party/boringssl-with-bazel/src/include/openssl/target.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/third_party/boringssl-with-bazel/src/include/openssl/target.h b/third_party/boringssl-with-bazel/src/include/openssl/target.h
-index 2760f52..e743402 100644
---- a/third_party/boringssl-with-bazel/src/include/openssl/target.h
-+++ b/third_party/boringssl-with-bazel/src/include/openssl/target.h
-@@ -54,6 +54,10 @@
- #define OPENSSL_32_BIT
- #elif defined(__myriad2__)
- #define OPENSSL_32_BIT
-+#elif defined(__PPC64__)
-+#define OPENSSL_64_BIT
-+#elif defined(__PPC__)
-+#define OPENSSL_32_BIT
- #else
- // The list above enumerates the platforms that BoringSSL supports. For these
- // platforms we keep a reasonable bar of not breaking them: automated test
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch
deleted file mode 100644
index 584723e6d1..0000000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From f84421d8ee06890e2c98c0f7c9ec6c73f88e77c3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 12 Feb 2023 21:25:04 -0800
-Subject: [PATCH] zlib: Include unistd.h for open/close C APIs
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- third_party/zlib/gzguts.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/third_party/zlib/gzguts.h b/third_party/zlib/gzguts.h
-index f937504..341a68d 100644
---- a/third_party/zlib/gzguts.h
-+++ b/third_party/zlib/gzguts.h
-@@ -18,6 +18,7 @@
- #endif
-
- #include <stdio.h>
-+#include <unistd.h>
- #include "zlib.h"
- #ifdef STDC
- # include <string.h>
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch
deleted file mode 100644
index 69e06a7918..0000000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From a2ec96a96ff7ba016e800212a942b9f29f255415 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 13 Mar 2021 10:26:25 -0800
-Subject: [PATCH] An all-in-one patch that fixes several issues:
-
-1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl)
-2) powerpc stacktrace implementation only works on glibc (disabled on musl)
-3) powerpc stacktrace implementation has ppc64 assumptions (fixed)
-4) examine_stack.cpp makes glibc assumptions on powerpc (fixed)
-
-Sourced from void linux
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Xu Huan <xuhuan.fnst@fujitsu.com>
-Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
----
- .../abseil-cpp/absl/base/internal/unscaledcycleclock.cc | 4 ++--
- .../absl/base/internal/unscaledcycleclock_config.h | 3 ++-
- .../abseil-cpp/absl/debugging/internal/examine_stack.cc | 8 +++++++-
- .../absl/debugging/internal/stacktrace_config.h | 2 +-
- 4 files changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
-index a0bf3a6..103b4f6 100644
---- a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
-+++ b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
-@@ -20,7 +20,7 @@
- #include <intrin.h>
- #endif
-
--#if defined(__powerpc__) || defined(__ppc__)
-+#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
- #ifdef __GLIBC__
- #include <sys/platform/ppc.h>
- #elif defined(__FreeBSD__)
-@@ -58,7 +58,7 @@ double UnscaledCycleClock::Frequency() {
- return base_internal::NominalCPUFrequency();
- }
-
--#elif defined(__powerpc__) || defined(__ppc__)
-+#elif (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
-
- int64_t UnscaledCycleClock::Now() {
- #ifdef __GLIBC__
-diff --git a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h
-index 43a3dab..196a853 100644
---- a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h
-+++ b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h
-@@ -21,7 +21,8 @@
-
- // The following platforms have an implementation of a hardware counter.
- #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
-- defined(__powerpc__) || defined(__ppc__) || defined(_M_IX86) || \
-+ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \
-+ defined(_M_IX86) || \
- (defined(_M_X64) && !defined(_M_ARM64EC))
- #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
- #else
-diff --git a/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc b/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc
-index 3dd6ba1..9f0601c 100644
---- a/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc
-+++ b/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc
-@@ -36,6 +36,10 @@
- #include <csignal>
- #include <cstdio>
-
-+#if defined(__powerpc__)
-+#include <asm/ptrace.h>
-+#endif
-+
- #include "absl/base/attributes.h"
- #include "absl/base/internal/raw_logging.h"
- #include "absl/base/macros.h"
-@@ -177,8 +181,10 @@ void* GetProgramCounter(void* const vuc) {
- return reinterpret_cast<void*>(context->uc_mcontext.pc);
- #elif defined(__powerpc64__)
- return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]);
--#elif defined(__powerpc__)
-+#elif defined(__powerpc__) && defined(__GLIBC__)
- return reinterpret_cast<void*>(context->uc_mcontext.uc_regs->gregs[32]);
-+#elif defined(__powerpc__)
-+ return reinterpret_cast<void*>(((struct pt_regs *)context->uc_regs)->gregs[32]);
- #elif defined(__riscv)
- return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]);
- #elif defined(__s390__) && !defined(__s390x__)
-diff --git a/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h b/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
-index 3929b1b..23d5e50 100644
---- a/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
-+++ b/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
-@@ -60,7 +60,7 @@
- #elif defined(__i386__) || defined(__x86_64__)
- #define ABSL_STACKTRACE_INL_HEADER \
- "absl/debugging/internal/stacktrace_x86-inl.inc"
--#elif defined(__ppc__) || defined(__PPC__)
-+#elif (defined(__ppc__) || defined(__PPC__)) && defined(__GLIBC__)
- #define ABSL_STACKTRACE_INL_HEADER \
- "absl/debugging/internal/stacktrace_powerpc-inl.inc"
- #elif defined(__aarch64__)
---
-2.43.0
-