From e55a5fe05783a0fb23a0658b8856741a6d053f31 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 5 Sep 2024 11:31:27 -0400 Subject: [PATCH] fix webrtc build --- backports/signal-desktop/APKBUILD | 4 ++- ...l-c7019036-do-not-define-crypto_addc.patch | 25 +++++++++++++++++++ .../webrtc-shared-like-my-wife.patch | 12 +++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 backports/signal-desktop/webrtc-boringssl-c7019036-do-not-define-crypto_addc.patch diff --git a/backports/signal-desktop/APKBUILD b/backports/signal-desktop/APKBUILD index 83cf064..3b97907 100644 --- a/backports/signal-desktop/APKBUILD +++ b/backports/signal-desktop/APKBUILD @@ -93,6 +93,7 @@ source=" webrtc-shared-like-my-wife.patch webrtc-compiler.patch webrtc-gcc13.patch + webrtc-boringssl-c7019036-do-not-define-crypto_addc.patch signal-desktop " @@ -483,8 +484,9 @@ be5b4e823543b79175a12314f10c6326d9f0d59f470136962daed4665887006acc05b48b40dc1b67 d50eb5724502df9ea4d795db8cfc27af767c25168d7db2af512e615be7cc2ca290210a9ae78e1abb153c0198677e858ad3d74926c958099d0319295e7d9e7f1d signal-update-links.patch bfc8acdd13aa48d29c7657311733cc9d33c4899782efbd1ef6d25ad1698be4de7cc67e829324bc0309715d69ae37ea9f782cf54887317e817213e110d73d68e7 signal-show-window-please.patch b11fdd930943ca327650e4738ed85cd6b5eea779455a5895bccebba98e449bafc6b0f09bcf4545f2b2e16644355664e9768dd6d4d62f87619207c430367f72c5 ringrtc-webrtc-renamed.patch -9d92389637cdda83a0a7039fa6c52516d7bc491d0b1e42d5374b9d1f4fa7b9c930642f2dca896da17a2dc3344fa1bb97434c8dddd0539a4fedfd0dec809fc875 webrtc-shared-like-my-wife.patch +f4e80ed7e67b98d6988c69ab5025286be17db29dc90f90bf837133cd8ae737f46293e6a2432b02f98c300ed461653b5a66801ff957a418c6a7c33877e3fe0443 webrtc-shared-like-my-wife.patch e07ae8544988d402aaf0fbd95ea36a64c94c59566c561132578aa6dcf8ff11a34058530e64dc204e5cadc2482f1401e74b32384a144e5e08017c663d0cf7c2fc webrtc-compiler.patch 88515d8b8cc82355c9f9b0f44fac83b7ff149b13e9fb102fd46036ec5234cfb2385fa5ad58a0520ee604b93dc4ddd6ae18a7005978ef207841645724ef7a9749 webrtc-gcc13.patch +2721dce75ed1b6cd8bff129cd90d05ea07ce61cafd9145913748cb1f4e58d4c042c3c43efc578ad84e15624937b7ed67b8d5fec3d764e7feb26ff28f86cacd77 webrtc-boringssl-c7019036-do-not-define-crypto_addc.patch 87534e7b5ad7365509eab75629e6bd1a9ed61ee92f7e358405a0abaf0df57de14623fb3894eb082f8785422e5c087e1c50f9e2e5cafbb2529591fd7bf447f7f5 signal-desktop " diff --git a/backports/signal-desktop/webrtc-boringssl-c7019036-do-not-define-crypto_addc.patch b/backports/signal-desktop/webrtc-boringssl-c7019036-do-not-define-crypto_addc.patch new file mode 100644 index 0000000..5eb6919 --- /dev/null +++ b/backports/signal-desktop/webrtc-boringssl-c7019036-do-not-define-crypto_addc.patch @@ -0,0 +1,25 @@ +diff --git a/third_party/boringssl/src/crypto/internal.h b/third_party/boringssl/src/crypto/internal.h +index a77102d76..a45f97bcc 100644 +--- a/third_party/boringssl/src/crypto/internal.h ++++ b/third_party/boringssl/src/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. + diff --git a/backports/signal-desktop/webrtc-shared-like-my-wife.patch b/backports/signal-desktop/webrtc-shared-like-my-wife.patch index bd7115a..7bfbd7f 100644 --- a/backports/signal-desktop/webrtc-shared-like-my-wife.patch +++ b/backports/signal-desktop/webrtc-shared-like-my-wife.patch @@ -26,3 +26,15 @@ suppressed_configs += [ "//build/config/compiler:thin_archive" ] defines = [] +diff --git a/third_party/googletest/BUILD.gn.orig b/third_party/googletest/BUILD.gn +index 14089f0..b7dc621 100644 +--- a/third_party/googletest/BUILD.gn.orig ++++ b/third_party/googletest/BUILD.gn +@@ -48,7 +48,6 @@ config("gtest_config") { + + configs = [ + "//third_party/abseil-cpp:absl_include_config", +- "//third_party/re2:re2_config", + ] + } +