diff options
Diffstat (limited to 'meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio')
5 files changed, 82 insertions, 20 deletions
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-absl-always-use-asm-sgidefs.h.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-absl-always-use-asm-sgidefs.h.patch new file mode 100644 index 000000000..be516ca50 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-absl-always-use-asm-sgidefs.h.patch @@ -0,0 +1,33 @@ +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-openembedded/meta-python/recipes-devtools/python/python3-grpcio/boring_ssl.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/boring_ssl.patch index 65db4a6ed..d12e35a99 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/boring_ssl.patch +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/boring_ssl.patch @@ -1,36 +1,50 @@ +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 -@@ -109,6 +109,8 @@ CLASSIFIERS = [ - BUILD_WITH_BORING_SSL_ASM = os.environ.get('GRPC_BUILD_WITH_BORING_SSL_ASM', - True) +@@ -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) - # Environment variable to determine whether or not the Cython extension should - # *use* Cython or use the generated C files. Note that this requires the C files - # to have been generated by building first *with* Cython support. Even if this -@@ -306,15 +308,15 @@ asm_key = '' - if BUILD_WITH_BORING_SSL_ASM and not BUILD_WITH_SYSTEM_OPENSSL: ++ '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' -- if LINUX_X86_64 == util.get_platform(): + 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 == util.get_platform(): +- elif LINUX_ARM == boringssl_asm_platform: + elif LINUX_ARM == BORING_SSL_PLATFORM: asm_key = 'crypto_linux_arm' -- elif "mac" in util.get_platform() and "x86_64" in util.get_platform(): -+ elif "mac" in BORING_SSL_PLATFORM and "x86_64" in BORING_SSL_PLATFORM: +- 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:", -- util.get_platform()) -+ BORING_SSL_PLATFORM) - if asm_key: - asm_files = grpc_core_dependencies.ASM_SOURCE_FILES[asm_key] - else: +-- +2.17.1 + diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch new file mode 100644 index 000000000..343f25a46 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch @@ -0,0 +1,15 @@ +--- 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-openembedded/meta-python/recipes-devtools/python/python3-grpcio/ppc-boringssl-support.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/ppc-boringssl-support.patch index dadd3da85..5c9be443d 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/ppc-boringssl-support.patch +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/ppc-boringssl-support.patch @@ -12,6 +12,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> +#elif (defined(__PPC__) || defined(__powerpc__)) +#define OPENSSL_32_BIT +#define OPENSSL_PPC - #elif defined(__mips__) && !defined(__LP64__) + #elif defined(__MIPSEL__) && !defined(__LP64__) #define OPENSSL_32_BIT #define OPENSSL_MIPS diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch index 7e071ae1e..350c67dea 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch @@ -5,7 +5,7 @@ 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(__mips__) && defined(__LP64__) + #elif defined(__MIPSEL__) && defined(__LP64__) #define OPENSSL_64_BIT #define OPENSSL_MIPS64 +#elif defined(__riscv) |