diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-grpcio')
9 files changed, 152 insertions, 212 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio/0001-Include-missing-cstdint-header.patch b/meta-python/recipes-devtools/python/python3-grpcio/0001-Include-missing-cstdint-header.patch new file mode 100644 index 0000000000..5cd94dee9c --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-grpcio/0001-Include-missing-cstdint-header.patch @@ -0,0 +1,30 @@ +From 252aa78526287fe033c5656cd166e551fa5daa88 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-python/recipes-devtools/python/python3-grpcio/0001-absl-always-use-asm-sgidefs.h.patch b/meta-python/recipes-devtools/python/python3-grpcio/0001-absl-always-use-asm-sgidefs.h.patch deleted file mode 100644 index be516ca508..0000000000 --- a/meta-python/recipes-devtools/python/python3-grpcio/0001-absl-always-use-asm-sgidefs.h.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 8f21fdfb83b0fa844a9f1f03a86a9ca46642d85e Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 9 Apr 2020 13:06:27 -0700 -Subject: [PATCH 1/2] absl: always use <asm/sgidefs.h> - -Fixes mips/musl build, since sgidefs.h is not present on all C libraries -but on linux asm/sgidefs.h is there and contains same definitions, using -that makes it portable. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - third_party/abseil-cpp/absl/base/internal/direct_mmap.h | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - ---- a/third_party/abseil-cpp/absl/base/internal/direct_mmap.h -+++ b/third_party/abseil-cpp/absl/base/internal/direct_mmap.h -@@ -41,13 +41,9 @@ - - #ifdef __mips__ - // Include definitions of the ABI currently in use. --#ifdef __BIONIC__ --// Android doesn't have sgidefs.h, but does have asm/sgidefs.h, which has the -+// bionic/musl C libs don't have sgidefs.h, but do have asm/sgidefs.h, which has the - // definitions we need. - #include <asm/sgidefs.h> --#else --#include <sgidefs.h> --#endif // __BIONIC__ - #endif // __mips__ - - // SYS_mmap and SYS_munmap are not defined in Android. 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 deleted file mode 100644 index 373669461b..0000000000 --- a/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch +++ /dev/null @@ -1,76 +0,0 @@ -From de10fbc2386dcac3ab810c49b6977b2ee01bf426 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 17 Feb 2021 13:30:23 -0800 -Subject: [PATCH] setup.py: Do not mix C and C++ compiler options - -EXTRA_ENV_COMPILE_ARGS is used both with CC and CXX -so using -std=c++11 or -std=gnu99 together will cause -build time errors espcially with clang - -Keep '-std=c++11' to fix native build error -with old gcc (such as gcc 5.4.0 on ubuntu 16.04), for clang -we will remove them through GRPC_PYTHON_CFLAGS at do_compile -in bb recipe. - -While export CC="gcc ", cc_args is None, it will -cause subprocess.Popen always return 1. On centos 8, if you don't -install package libatomic, there will be a native build error -`cannot find /usr/lib64/libatomic.so.1.2.0'. - -Add no harm '-g' to cc_args if cc_args is empty. - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - setup.py | 9 ++++++--- - src/python/grpcio/commands.py | 5 ++++- - 2 files changed, 10 insertions(+), 4 deletions(-) - -diff --git a/setup.py b/setup.py -index 4b8c9d4..271b7b1 100644 ---- a/setup.py -+++ b/setup.py -@@ -172,8 +172,11 @@ def check_linker_need_libatomic(): - """Test if linker on system needs libatomic.""" - code_test = (b'#include <atomic>\n' + - b'int main() { return std::atomic<int64_t>{}; }') -- cxx = os.environ.get('CXX', 'c++') -- cpp_test = subprocess.Popen([cxx, '-x', 'c++', '-std=c++11', '-'], -+ cxx, cxx_args = os.environ.get('CXX').split(' ', 1) or 'c++' -+ if not cxx_args: -+ cxx_args = "-g" -+ -+ cpp_test = subprocess.Popen([cxx, cxx_args, '-x', 'c++', '-std=c++11', '-'], - stdin=PIPE, - stdout=PIPE, - stderr=PIPE) -@@ -183,7 +186,7 @@ def check_linker_need_libatomic(): - # Double-check to see if -latomic actually can solve the problem. - # https://github.com/grpc/grpc/issues/22491 - cpp_test = subprocess.Popen( -- [cxx, '-x', 'c++', '-std=c++11', '-latomic', '-'], -+ [cxx, cxx_args, '-x', 'c++', '-std=c++11', '-latomic', '-'], - stdin=PIPE, - stdout=PIPE, - stderr=PIPE) -diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py -index a8b2ff5..b928201 100644 ---- a/src/python/grpcio/commands.py -+++ b/src/python/grpcio/commands.py -@@ -219,7 +219,10 @@ class BuildExt(build_ext.build_ext): - """ - try: - # TODO(lidiz) Remove the generated a.out for success tests. -- cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++11', '-'], -+ cc_test, cc_args = os.environ.get('CC').split(' ', 1) or 'gcc' -+ if not cc_args: -+ cc_args = "-g" -+ cc_test = subprocess.Popen([cc_test, cc_args, '-x', 'c', '-std=c++11', '-'], - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) --- -2.30.1 - diff --git a/meta-python/recipes-devtools/python/python3-grpcio/0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch b/meta-python/recipes-devtools/python/python3-grpcio/0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch new file mode 100644 index 0000000000..34ef7874e8 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-grpcio/0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch @@ -0,0 +1,24 @@ +From 671618df3e48619f0c7a5a3acd8982374a5e43db 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-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 0000000000..f39a9616d9 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch @@ -0,0 +1,98 @@ +From 102dcce6610e6606fffd3a4986f84eb52177f8c8 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> +--- + .../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 05e0e7b..f11fecb 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 24b324a..5e232c1 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(__riscv) || \ ++ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \ ++ defined(__riscv) || \ + 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__) diff --git a/meta-python/recipes-devtools/python/python3-grpcio/boring_ssl.patch b/meta-python/recipes-devtools/python/python3-grpcio/boring_ssl.patch deleted file mode 100644 index d12e35a993..0000000000 --- a/meta-python/recipes-devtools/python/python3-grpcio/boring_ssl.patch +++ /dev/null @@ -1,50 +0,0 @@ -From f71b32eb8a5c173fc5733847437b9485d75bb2e5 Mon Sep 17 00:00:00 2001 -From: Leon Anavi <leon.anavi@konsulko.com> -Date: Fri, 9 Apr 2021 14:06:36 +0300 -Subject: [PATCH] setup.py: Fix determining target platform - -Do not poke at the build machine to determine target platform or architecture -pass it from environment instead for cross compiling to work - -Upstream-Status: Inappropriate [OE-Specific] -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> ---- - setup.py | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/setup.py b/setup.py -index c93d419f32..71a944a9d0 100644 ---- a/setup.py -+++ b/setup.py -@@ -116,6 +116,9 @@ def _env_bool_value(env_name, default): - BUILD_WITH_BORING_SSL_ASM = _env_bool_value('GRPC_BUILD_WITH_BORING_SSL_ASM', - 'True') - -+BORING_SSL_PLATFORM = os.environ.get('GRPC_BORING_SSL_PLATFORM', -+ 'True') -+ - # Export this environment variable to override the platform variant that will - # be chosen for boringssl assembly optimizations. This option is useful when - # crosscompiling and the host platform as obtained by distutils.utils.get_platform() -@@ -336,13 +339,13 @@ if BUILD_WITH_BORING_SSL_ASM and not BUILD_WITH_SYSTEM_OPENSSL: - LINUX_X86_64 = 'linux-x86_64' - LINUX_ARM = 'linux-arm' - LINUX_AARCH64 = 'linux-aarch64' -- if LINUX_X86_64 == boringssl_asm_platform: -+ if LINUX_X86_64 == BORING_SSL_PLATFORM: - asm_key = 'crypto_linux_x86_64' -- elif LINUX_ARM == boringssl_asm_platform: -+ elif LINUX_ARM == BORING_SSL_PLATFORM: - asm_key = 'crypto_linux_arm' -- elif LINUX_AARCH64 == boringssl_asm_platform: -+ elif LINUX_AARCH64 == BORING_SSL_PLATFORM: - asm_key = 'crypto_linux_aarch64' -- elif "mac" in boringssl_asm_platform and "x86_64" in boringssl_asm_platform: -+ elif "mac" in boringssl_asm_platform and "x86_64" in BORING_SSL_PLATFORM: - asm_key = 'crypto_mac_x86_64' - else: - print("ASM Builds for BoringSSL currently not supported on:", --- -2.17.1 - diff --git a/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch b/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch deleted file mode 100644 index 343f25a46e..0000000000 --- a/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/third_party/boringssl-with-bazel/src/include/openssl/base.h -+++ b/third_party/boringssl-with-bazel/src/include/openssl/base.h -@@ -102,10 +102,10 @@ extern "C" { - #elif (defined(__PPC__) || defined(__powerpc__)) - #define OPENSSL_32_BIT - #define OPENSSL_PPC --#elif defined(__MIPSEL__) && !defined(__LP64__) -+#elif defined(__mips__) && !defined(__LP64__) - #define OPENSSL_32_BIT - #define OPENSSL_MIPS --#elif defined(__MIPSEL__) && defined(__LP64__) -+#elif defined(__mips__) && defined(__LP64__) - #define OPENSSL_64_BIT - #define OPENSSL_MIPS64 - #elif defined(__riscv) diff --git a/meta-python/recipes-devtools/python/python3-grpcio/ppc-boringssl-support.patch b/meta-python/recipes-devtools/python/python3-grpcio/ppc-boringssl-support.patch deleted file mode 100644 index 5c9be443d8..0000000000 --- a/meta-python/recipes-devtools/python/python3-grpcio/ppc-boringssl-support.patch +++ /dev/null @@ -1,17 +0,0 @@ -Let boringSSL compile on ppc32 bit - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- a/third_party/boringssl-with-bazel/src/include/openssl/base.h -+++ b/third_party/boringssl-with-bazel/src/include/openssl/base.h -@@ -99,6 +99,9 @@ extern "C" { - #elif (defined(__PPC64__) || defined(__powerpc64__)) && defined(_LITTLE_ENDIAN) - #define OPENSSL_64_BIT - #define OPENSSL_PPC64LE -+#elif (defined(__PPC__) || defined(__powerpc__)) -+#define OPENSSL_32_BIT -+#define OPENSSL_PPC - #elif defined(__MIPSEL__) && !defined(__LP64__) - #define OPENSSL_32_BIT - #define OPENSSL_MIPS diff --git a/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch b/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch deleted file mode 100644 index 350c67deaf..0000000000 --- a/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch +++ /dev/null @@ -1,21 +0,0 @@ -Add RISC-V 64bit support - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- a/third_party/boringssl-with-bazel/src/include/openssl/base.h -+++ b/third_party/boringssl-with-bazel/src/include/openssl/base.h -@@ -108,6 +108,14 @@ extern "C" { - #elif defined(__MIPSEL__) && defined(__LP64__) - #define OPENSSL_64_BIT - #define OPENSSL_MIPS64 -+#elif defined(__riscv) -+# if (__riscv_xlen == 64) -+# define OPENSSL_64_BIT -+# define OPENSSL_RISCV64 -+# elif(__riscv_xlen == 32) -+# define OPENSSL_32_BIT -+# define OPENSSL_RISCV32 -+# endif - #elif defined(__pnacl__) - #define OPENSSL_32_BIT - #define OPENSSL_PNACL |