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 @@ | |||
1 | From 45fdade6c0415ec5af3f9312e6311a4ccc682a7b Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 28 Dec 2022 18:24:21 -0800 | ||
4 | Subject: [PATCH] direct_mmap: Use off_t on linux | ||
5 | |||
6 | off64_t is not provided without defining _LARGEFILE64_SOURCE on musl | ||
7 | this define is not defined automatically like glibc where it gets | ||
8 | defined when _GNU_SOURCE is defined. Using off_t makes it portable | ||
9 | across musl/glibc and for using 64bit off_t on glibc 32bit systems | ||
10 | -D_FILE_OFFSET_BITS=64 can be defined during build via CXXFLAGS | ||
11 | |||
12 | Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/1349] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | absl/base/internal/direct_mmap.h | 4 ++-- | ||
16 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | --- a/third_party/abseil-cpp/absl/base/internal/direct_mmap.h | ||
19 | +++ b/third_party/abseil-cpp/absl/base/internal/direct_mmap.h | ||
20 | @@ -72,7 +72,7 @@ namespace base_internal { | ||
21 | // Platform specific logic extracted from | ||
22 | // https://chromium.googlesource.com/linux-syscall-support/+/master/linux_syscall_support.h | ||
23 | inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, | ||
24 | - off64_t offset) noexcept { | ||
25 | + off_t offset) noexcept { | ||
26 | #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \ | ||
27 | defined(__m68k__) || defined(__sh__) || \ | ||
28 | (defined(__hppa__) && !defined(__LP64__)) || \ | ||
29 | @@ -102,7 +102,7 @@ inline void* DirectMmap(void* start, siz | ||
30 | #else | ||
31 | return reinterpret_cast<void*>( | ||
32 | syscall(SYS_mmap2, start, length, prot, flags, fd, | ||
33 | - static_cast<off_t>(offset / pagesize))); | ||
34 | + offset / pagesize)); | ||
35 | #endif | ||
36 | #elif defined(__s390x__) | ||
37 | // 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> | |||
14 | 14 | ||
15 | --- a/third_party/protobuf/src/google/protobuf/port_def.inc | 15 | --- a/third_party/protobuf/src/google/protobuf/port_def.inc |
16 | +++ b/third_party/protobuf/src/google/protobuf/port_def.inc | 16 | +++ b/third_party/protobuf/src/google/protobuf/port_def.inc |
17 | @@ -338,6 +338,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125 | 17 | @@ -298,6 +298,7 @@ |
18 | #error PROTOBUF_TAILCALL was previously defined | 18 | #error PROTOBUF_TAILCALL was previously defined |
19 | #endif | 19 | #endif |
20 | #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ | 20 | #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \ |
21 | + !defined(__mips__) && \ | 21 | + !defined(__mips__) && \ |
22 | !defined(_ARCH_PPC) && !defined(__wasm__) && \ | 22 | !defined(_ARCH_PPC) && !defined(__wasm__) && \ |
23 | !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) && \ | 23 | !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) |
24 | !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) | 24 | // 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 | |||
30 | index cc53e79..be3bc78 100644 | 30 | index cc53e79..be3bc78 100644 |
31 | --- a/setup.py | 31 | --- a/setup.py |
32 | +++ b/setup.py | 32 | +++ b/setup.py |
33 | @@ -87,8 +87,11 @@ def check_linker_need_libatomic(): | 33 | @@ -88,9 +88,11 @@ |
34 | """Test if linker on system needs libatomic.""" | 34 | b"#include <atomic>\n" |
35 | code_test = (b'#include <atomic>\n' + | 35 | + b"int main() { return std::atomic<int64_t>{}; }" |
36 | b'int main() { return std::atomic<int64_t>{}; }') | 36 | ) |
37 | - cxx = os.environ.get('CXX', 'c++') | 37 | - cxx = os.environ.get("CXX", "c++") |
38 | - cpp_test = subprocess.Popen([cxx, '-x', 'c++', '-std=c++14', '-'], | 38 | - cpp_test = subprocess.Popen( |
39 | - [cxx, "-x", "c++", "-std=c++14", "-"], | ||
39 | + cxx, cxx_args = os.environ.get('CXX').split(' ', 1) or 'c++' | 40 | + cxx, cxx_args = os.environ.get('CXX').split(' ', 1) or 'c++' |
40 | + if not cxx_args: | 41 | + if not cxx_args: |
41 | + cxx_args = "-g" | 42 | + cxx_args = "-g" |
42 | + | 43 | + |
43 | + cpp_test = subprocess.Popen([cxx, cxx_args, '-x', 'c++', '-std=c++14', '-'], | 44 | + cpp_test = subprocess.Popen([cxx, cxx_args, '-x', 'c++', '-std=c++14', '-'], |
44 | stdin=PIPE, | 45 | stdin=PIPE, |
45 | stdout=PIPE, | 46 | stdout=PIPE, |
46 | stderr=PIPE) | 47 | stderr=PIPE, |
47 | @@ -98,7 +101,7 @@ def check_linker_need_libatomic(): | 48 | @@ -101,7 +103,7 @@ |
48 | # Double-check to see if -latomic actually can solve the problem. | 49 | # Double-check to see if -latomic actually can solve the problem. |
49 | # https://github.com/grpc/grpc/issues/22491 | 50 | # https://github.com/grpc/grpc/issues/22491 |
50 | cpp_test = subprocess.Popen( | 51 | cpp_test = subprocess.Popen( |
51 | - [cxx, '-x', 'c++', '-std=c++14', '-', '-latomic'], | 52 | - [cxx, "-x", "c++", "-std=c++14", "-", "-latomic"], |
52 | + [cxx, cxx_args, '-x', 'c++', '-std=c++14', '-', '-latomic'], | 53 | + [cxx, cxx_args, '-x', 'c++', '-std=c++14', '-', '-latomic'], |
53 | stdin=PIPE, | 54 | stdin=PIPE, |
54 | stdout=PIPE, | 55 | stdout=PIPE, |
55 | stderr=PIPE) | 56 | stderr=PIPE, |
56 | -- | 57 | -- |
57 | 2.25.1 | 58 | 2.25.1 |
58 | 59 | ||