summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--grpc-gcc14.patch44
-rw-r--r--php-pecl-grpc.spec9
2 files changed, 52 insertions, 1 deletions
diff --git a/grpc-gcc14.patch b/grpc-gcc14.patch
new file mode 100644
index 0000000..1d73348
--- /dev/null
+++ b/grpc-gcc14.patch
@@ -0,0 +1,44 @@
+From c70190368c7040c37c1d655f0690bcde2b109a0d Mon Sep 17 00:00:00 2001
+From: David Benjamin <davidben@google.com>
+Date: Thu, 16 May 2024 11:00:42 -0400
+Subject: [PATCH 1/3] Don't define CRYPTO_addc_* and CRYPTO_subc_* in C++
+
+GCC does not support C11 _Generic in C++ mode.
+
+Change-Id: I974a0b04bbe4900419736044d0d8050f2b856d56
+Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/68507
+Auto-Submit: David Benjamin <davidben@google.com>
+Commit-Queue: David Benjamin <davidben@google.com>
+Reviewed-by: Adam Langley <agl@google.com>
+---
+ crypto/internal.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/crypto/internal.h b/crypto/internal.h
+index a77102d76..a45f97bcc 100644
+--- a/crypto/internal.h
++++ b/crypto/internal.h
+@@ -1174,6 +1174,11 @@ static inline uint64_t CRYPTO_rotr_u64(uint64_t value, int shift) {
+
+ // Arithmetic functions.
+
++// The most efficient versions of these functions on GCC and Clang depend on C11
++// |_Generic|. If we ever need to call these from C++, we'll need to add a
++// variant that uses C++ overloads instead.
++#if !defined(__cplusplus)
++
+ // CRYPTO_addc_* returns |x + y + carry|, and sets |*out_carry| to the carry
+ // bit. |carry| must be zero or one.
+ #if OPENSSL_HAS_BUILTIN(__builtin_addc)
+@@ -1275,6 +1280,8 @@ static inline uint64_t CRYPTO_subc_u64(uint64_t x, uint64_t y, uint64_t borrow,
+ #define CRYPTO_subc_w CRYPTO_subc_u32
+ #endif
+
++#endif // !__cplusplus
++
+
+ // FIPS functions.
+
+--
+2.45.0
+
diff --git a/php-pecl-grpc.spec b/php-pecl-grpc.spec
index d27127f..bd6bae5 100644
--- a/php-pecl-grpc.spec
+++ b/php-pecl-grpc.spec
@@ -22,13 +22,14 @@
Summary: General RPC framework
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: Apache-2.0
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{sources}.tgz
Patch0: %{pecl_name}-build.patch
Patch1: %{pecl_name}-noatfork.patch
+Patch2: %{pecl_name}-gcc14.patch
%if 0%{?rhel} == 7 && 0%{?dtsversion} < 7
BuildRequires: devtoolset-7-toolchain
@@ -75,6 +76,9 @@ cd %{sources}
%ifarch %{arm}
%patch -P1 -p1 -b .noatfork
%endif
+pushd third_party/boringssl-with-bazel/src
+%patch -P2 -p1 -b .gcc14
+popd
#sed -e '/PHP_GRPC_VERSION/s/RC3/RC2/' -i src/php/ext/grpc/version.h
@@ -204,6 +208,9 @@ cd ../ZTS
%changelog
+* Fri May 17 2024 Remi Collet <remi@remirepo.net> - 1.63.0-2
+- add boringssl upstream patch for GCC 14
+
* Wed May 1 2024 Remi Collet <remi@remirepo.net> - 1.63.0-1
- update to 1.63.0