diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-grpcio-tools')
3 files changed, 18 insertions, 54 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-direct_mmap-Use-off_t-on-linux.patch b/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-direct_mmap-Use-off_t-on-linux.patch deleted file mode 100644 index 9b3e5d4a5f..0000000000 --- a/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-direct_mmap-Use-off_t-on-linux.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 45fdade6c0415ec5af3f9312e6311a4ccc682a7b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 28 Dec 2022 18:24:21 -0800 -Subject: [PATCH] direct_mmap: Use off_t on linux - -off64_t is not provided without defining _LARGEFILE64_SOURCE on musl -this define is not defined automatically like glibc where it gets -defined when _GNU_SOURCE is defined. Using off_t makes it portable -across musl/glibc and for using 64bit off_t on glibc 32bit systems --D_FILE_OFFSET_BITS=64 can be defined during build via CXXFLAGS - -Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/1349] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - absl/base/internal/direct_mmap.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/third_party/abseil-cpp/absl/base/internal/direct_mmap.h -+++ b/third_party/abseil-cpp/absl/base/internal/direct_mmap.h -@@ -72,7 +72,7 @@ namespace base_internal { - // Platform specific logic extracted from - // https://chromium.googlesource.com/linux-syscall-support/+/master/linux_syscall_support.h - inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, -- off64_t offset) noexcept { -+ off_t offset) noexcept { - #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \ - defined(__m68k__) || defined(__sh__) || \ - (defined(__hppa__) && !defined(__LP64__)) || \ -@@ -102,7 +102,7 @@ inline void* DirectMmap(void* start, siz - #else - return reinterpret_cast<void*>( - syscall(SYS_mmap2, start, length, prot, flags, fd, -- static_cast<off_t>(offset / pagesize))); -+ offset / pagesize)); - #endif - #elif defined(__s390x__) - // On s390x, mmap() arguments are passed in memory. diff --git a/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch b/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch index 8c70b2b6a6..67505d0ce1 100644 --- a/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch +++ b/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch @@ -14,11 +14,11 @@ Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> --- a/third_party/protobuf/src/google/protobuf/port_def.inc +++ b/third_party/protobuf/src/google/protobuf/port_def.inc -@@ -338,6 +338,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125 +@@ -298,6 +298,7 @@ #error PROTOBUF_TAILCALL was previously defined #endif - #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ -+ !defined(__mips__) && \ + #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \ ++ !defined(__mips__) && \ !defined(_ARCH_PPC) && !defined(__wasm__) && \ - !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) && \ - !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) + !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) + // Compilation fails on ARM32: b/195943306 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 4aa11bd57a..07276c17f6 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 @@ -30,29 +30,30 @@ diff --git a/setup.py b/setup.py index cc53e79..be3bc78 100644 --- a/setup.py +++ b/setup.py -@@ -87,8 +87,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++14', '-'], +@@ -88,9 +88,11 @@ + 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++14", "-"], + 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++14', '-'], - stdin=PIPE, - stdout=PIPE, - stderr=PIPE) -@@ -98,7 +101,7 @@ def check_linker_need_libatomic(): + stdin=PIPE, + stdout=PIPE, + stderr=PIPE, +@@ -101,7 +103,7 @@ # 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++14', '-', '-latomic'], +- [cxx, "-x", "c++", "-std=c++14", "-", "-latomic"], + [cxx, cxx_args, '-x', 'c++', '-std=c++14', '-', '-latomic'], stdin=PIPE, stdout=PIPE, - stderr=PIPE) + stderr=PIPE, -- 2.25.1 |