summaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/recipes-devtools/python/python3-grpcio/0001-crypto-use-_Generic-only-if-defined-__cplusplus.patch73
-rw-r--r--meta-python/recipes-devtools/python/python3-grpcio/0001-target.h-define-proper-macro-for-ppc-ppc64.patch34
-rw-r--r--meta-python/recipes-devtools/python/python3-grpcio_1.69.0.bb17
3 files changed, 2 insertions, 122 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio/0001-crypto-use-_Generic-only-if-defined-__cplusplus.patch b/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-python/recipes-devtools/python/python3-grpcio/0001-crypto-use-_Generic-only-if-defined-__cplusplus.patch
+++ /dev/null
@@ -1,73 +0,0 @@
1From eee5daeb5b53b0c4a013aa5887a726434ec81600 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <martin.jansa@gmail.com>
3Date: Mon, 6 May 2024 01:36:39 +0200
4Subject: [PATCH] crypto: use _Generic only if !defined(__cplusplus)
5
6* fixes build with gcc-14 which has __builtin_addc and __builtin_subc
7 with gcc-13 it was already using the #else branch because of missing builtins
8
9* fixes
10 https://github.com/grpc/grpc/issues/35945
11
12* _Generic was introduced in boringssl with:
13 https://boringssl.googlesource.com/boringssl/+/70ca6bc24be103dabd68e448cd3af29b929b771d%5E%21/#F4
14
15* but e.g. third_party/boringssl-with-bazel/src/ssl/d1_both.cc includes
16 this internal.h and from the .cc extension gcc will process it as C++
17 where _Generic isn't available, causing:
18
19In file included from third_party/boringssl-with-bazel/src/ssl/d1_both.cc:125:
20third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h: In function 'uint32_t CRYPTO_addc_u32(uint32_t, uint32_t, uint32_t, uint32_t*)':
21third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1159:7: error: expected primary-expression before 'unsigned'
22 1159 | unsigned: __builtin_addc, \
23 | ^~~~~~~~
24third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1166:10: note: in expansion of macro 'CRYPTO_GENERIC_ADDC'
25 1166 | return CRYPTO_GENERIC_ADDC(x, y, carry, out_carry);
26 | ^~~~~~~~~~~~~~~~~~~
27third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1160:7: error: expected primary-expression before 'unsigned'
28 1160 | unsigned long: __builtin_addcl, \
29 | ^~~~~~~~
30third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1166:10: note: in expansion of macro 'CRYPTO_GENERIC_ADDC'
31 1166 | return CRYPTO_GENERIC_ADDC(x, y, carry, out_carry);
32 | ^~~~~~~~~~~~~~~~~~~
33third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1161:7: error: expected primary-expression before 'unsigned'
34 1161 | unsigned long long: __builtin_addcll))((x), (y), (carry), (out_carry))
35 | ^~~~~~~~
36third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1166:10: note: in expansion of macro 'CRYPTO_GENERIC_ADDC'
37 1166 | return CRYPTO_GENERIC_ADDC(x, y, carry, out_carry);
38 | ^~~~~~~~~~~~~~~~~~~
39third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1158:4: error: '_Generic' was not declared in this scope
40 1158 | (_Generic((x), \
41 | ^~~~~~~~
42third_party/boringssl-with-bazel/src/ssl/../crypto/internal.h:1166:10: note: in expansion of macro 'CRYPTO_GENERIC_ADDC'
43 1166 | return CRYPTO_GENERIC_ADDC(x, y, carry, out_carry);
44 | ^~~~~~~~~~~~~~~~~~~
45
46Upstream-Status: Submitted [https://boringssl-review.googlesource.com/c/boringssl/+/68227 crypto: use _Generic only if !defined(__cplusplus)]
47Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
48---
49 crypto/internal.h | 4 ++--
50 1 file changed, 2 insertions(+), 2 deletions(-)
51
52diff --git a/crypto/internal.h b/crypto/internal.h
53index f93c2e5..2fca2fb 100644
54--- a/crypto/internal.h
55+++ b/crypto/internal.h
56@@ -1206,7 +1206,7 @@ static inline uint64_t CRYPTO_rotr_u64(uint64_t value, int shift) {
57
58 // CRYPTO_addc_* returns |x + y + carry|, and sets |*out_carry| to the carry
59 // bit. |carry| must be zero or one.
60-#if OPENSSL_HAS_BUILTIN(__builtin_addc)
61+#if OPENSSL_HAS_BUILTIN(__builtin_addc) && !defined(__cplusplus)
62
63 #define CRYPTO_GENERIC_ADDC(x, y, carry, out_carry) \
64 (_Generic((x), \
65@@ -1258,7 +1258,7 @@ static inline uint64_t CRYPTO_addc_u64(uint64_t x, uint64_t y, uint64_t carry,
66
67 // CRYPTO_subc_* returns |x - y - borrow|, and sets |*out_borrow| to the borrow
68 // bit. |borrow| must be zero or one.
69-#if OPENSSL_HAS_BUILTIN(__builtin_subc)
70+#if OPENSSL_HAS_BUILTIN(__builtin_subc) && !defined(__cplusplus)
71
72 #define CRYPTO_GENERIC_SUBC(x, y, borrow, out_borrow) \
73 (_Generic((x), \
diff --git a/meta-python/recipes-devtools/python/python3-grpcio/0001-target.h-define-proper-macro-for-ppc-ppc64.patch b/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-python/recipes-devtools/python/python3-grpcio/0001-target.h-define-proper-macro-for-ppc-ppc64.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From e2c78c555ab3d9509c4ade511e2f711eb7188626 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 15 May 2024 16:55:09 +0800
4Subject: [PATCH] target.h: define proper macro for ppc/ppc64
5
6Fix error:
7third_party/boringssl-with-bazel/src/include/openssl/target.h:74:2: error: #error "Unknown target CPU"
8third_party/boringssl-with-bazel/src/include/openssl/bn.h:172:2: error: #error "Must define either OPENSSL_32_BIT or OPENSSL_64_BIT"
9third_party/boringssl-with-bazel/src/include/openssl/bn.h:230:44: error: 'BN_ULONG' has not been declared
10
11BN_ULONG will be defined after set proper OPENSSL_32_BIT or OPENSSL_64_BIT
12
13Upstream-Status: Pending
14
15Signed-off-by: Changqing Li <changqing.li@windriver.com>
16---
17 third_party/boringssl-with-bazel/src/include/openssl/target.h | 4 ++++
18 1 file changed, 4 insertions(+)
19
20diff --git a/third_party/boringssl-with-bazel/src/include/openssl/target.h b/third_party/boringssl-with-bazel/src/include/openssl/target.h
21index 2760f52..e743402 100644
22--- a/third_party/boringssl-with-bazel/src/include/openssl/target.h
23+++ b/third_party/boringssl-with-bazel/src/include/openssl/target.h
24@@ -54,6 +54,10 @@
25 #define OPENSSL_32_BIT
26 #elif defined(__myriad2__)
27 #define OPENSSL_32_BIT
28+#elif defined(__PPC64__)
29+#define OPENSSL_64_BIT
30+#elif defined(__PPC__)
31+#define OPENSSL_32_BIT
32 #else
33 // The list above enumerates the platforms that BoringSSL supports. For these
34 // platforms we keep a reasonable bar of not breaking them: automated test
diff --git a/meta-python/recipes-devtools/python/python3-grpcio_1.69.0.bb b/meta-python/recipes-devtools/python/python3-grpcio_1.69.0.bb
index 0265fc0adc..32d4fbc22a 100644
--- a/meta-python/recipes-devtools/python/python3-grpcio_1.69.0.bb
+++ b/meta-python/recipes-devtools/python/python3-grpcio_1.69.0.bb
@@ -4,14 +4,12 @@ SECTION = "devel/python"
4LICENSE = "Apache-2.0 & BSD-3-Clause" 4LICENSE = "Apache-2.0 & BSD-3-Clause"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906"
6 6
7DEPENDS += "python3-protobuf" 7DEPENDS += "openssl python3-protobuf"
8 8
9SRC_URI += "file://0001-python-enable-unbundled-cross-compilation.patch \ 9SRC_URI += "file://0001-python-enable-unbundled-cross-compilation.patch \
10 file://0001-Include-missing-cstdint-header.patch \ 10 file://0001-Include-missing-cstdint-header.patch \
11 file://abseil-ppc-fixes.patch \ 11 file://abseil-ppc-fixes.patch \
12 file://0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch \ 12 file://0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch \
13 file://0001-crypto-use-_Generic-only-if-defined-__cplusplus.patch;patchdir=third_party/boringssl-with-bazel/src/ \
14 file://0001-target.h-define-proper-macro-for-ppc-ppc64.patch \
15 " 13 "
16SRC_URI[sha256sum] = "936fa44241b5379c5afc344e1260d467bee495747eaf478de825bab2791da6f5" 14SRC_URI[sha256sum] = "936fa44241b5379c5afc344e1260d467bee495747eaf478de825bab2791da6f5"
17 15
@@ -22,18 +20,7 @@ inherit pypi
22 20
23CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" 21CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE"
24 22
25BORING_SSL_PLATFORM:arm = "linux-arm" 23export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = "1"
26BORING_SSL_PLATFORM:x86-64 = "linux-x86_64"
27BORING_SSL_PLATFORM:aarch64 = "linux-aarch64"
28BORING_SSL_PLATFORM ?= "unsupported"
29export GRPC_BORING_SSL_PLATFORM = "${BORING_SSL_PLATFORM}"
30export GRPC_BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM = "${BORING_SSL_PLATFORM}"
31
32BORING_SSL:arm = "1"
33BORING_SSL:x86-64 = "1"
34BORING_SSL:aarch64 = "1"
35BORING_SSL ?= "0"
36export GRPC_BUILD_WITH_BORING_SSL_ASM = "${BORING_SSL}"
37 24
38GRPC_CFLAGS ?= "" 25GRPC_CFLAGS ?= ""
39GRPC_CFLAGS:append:toolchain-clang = " -fvisibility=hidden -fno-wrapv -fno-exceptions" 26GRPC_CFLAGS:append:toolchain-clang = " -fvisibility=hidden -fno-wrapv -fno-exceptions"