Skip to content

Commit bd22ca7

Browse files
authored
[BUILD] Fix boringssl compile error for GCC11 & GCC12. (#440)
1 parent 3537966 commit bd22ca7

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

tensorflow/workspace.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
649649

650650
tf_http_archive(
651651
name = "boringssl",
652+
patch_file = clean_dep("//third_party:0001-boringssl.patch"),
652653
sha256 = "1188e29000013ed6517168600fc35a010d58c5d321846d6a6dfee74e4c788b45",
653654
strip_prefix = "boringssl-7f634429a04abc48e2eb041c81c5235816c96514",
654655
system_build_file = clean_dep("//third_party/systemlibs:boringssl.BUILD"),

third_party/0001-boringssl.patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/src/third_party/fiat/curve25519.c b/src/third_party/fiat/curve25519.c
2+
index 60da1c890..97c6bec4d 100644
3+
--- a/src/third_party/fiat/curve25519.c
4+
+++ b/src/third_party/fiat/curve25519.c
5+
@@ -1902,7 +1902,7 @@ static void table_select(ge_precomp *t, int pos, signed char b) {
6+
//
7+
// Preconditions:
8+
// a[31] <= 127
9+
-void x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t *a) {
10+
+void x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t a[32]) {
11+
signed char e[64];
12+
signed char carry;
13+
ge_p1p1 r;
14+
diff --git a/src/crypto/fipsmodule/bn/internal.h b/src/crypto/fipsmodule/bn/internal.h
15+
index 9796831f5..f74d03e68 100644
16+
--- a/src/crypto/fipsmodule/bn/internal.h
17+
+++ b/src/crypto/fipsmodule/bn/internal.h
18+
@@ -285,7 +285,7 @@ void bn_mul_comba4(BN_ULONG r[8], const BN_ULONG a[4], const BN_ULONG b[4]);
19+
void bn_mul_comba8(BN_ULONG r[16], const BN_ULONG a[8], const BN_ULONG b[8]);
20+
21+
// bn_sqr_comba8 sets |r| to |a|^2.
22+
-void bn_sqr_comba8(BN_ULONG r[16], const BN_ULONG a[4]);
23+
+void bn_sqr_comba8(BN_ULONG r[16], const BN_ULONG a[8]);
24+
25+
// bn_sqr_comba4 sets |r| to |a|^2.
26+
void bn_sqr_comba4(BN_ULONG r[8], const BN_ULONG a[4]);

0 commit comments

Comments
 (0)