summarylogtreecommitdiffstats
path: root/boringssl-gcc-14.patch
diff options
context:
space:
mode:
Diffstat (limited to 'boringssl-gcc-14.patch')
-rw-r--r--boringssl-gcc-14.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/boringssl-gcc-14.patch b/boringssl-gcc-14.patch
new file mode 100644
index 000000000000..366e21f458d1
--- /dev/null
+++ b/boringssl-gcc-14.patch
@@ -0,0 +1,22 @@
+diff --git a/third_party/boringssl/src/crypto/internal.h b/third_party/boringssl/src/crypto/internal.h
+index 762eaae8c..27652fbe9 100644
+--- a/third_party/boringssl/src/crypto/internal.h
++++ b/third_party/boringssl/src/crypto/internal.h
+@@ -1201,7 +1201,7 @@ static inline uint64_t CRYPTO_rotr_u64(uint64_t value, int shift) {
+
+ // 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)
++#if OPENSSL_HAS_BUILTIN(__builtin_addc) && !defined(__cplusplus)
+
+ #define CRYPTO_GENERIC_ADDC(x, y, carry, out_carry) \
+ (_Generic((x), \
+@@ -1253,7 +1253,7 @@ static inline uint64_t CRYPTO_addc_u64(uint64_t x, uint64_t y, uint64_t carry,
+
+ // CRYPTO_subc_* returns |x - y - borrow|, and sets |*out_borrow| to the borrow
+ // bit. |borrow| must be zero or one.
+-#if OPENSSL_HAS_BUILTIN(__builtin_subc)
++#if OPENSSL_HAS_BUILTIN(__builtin_subc) && !defined(__cplusplus)
+
+ #define CRYPTO_GENERIC_SUBC(x, y, borrow, out_borrow) \
+ (_Generic((x), \