Skip to content

Commit 101882d

Browse files
committed
Added BoringSSL patch for s390x & ppc64le
Signed-off-by: Ted Poole <tpoole@redhat.com>
1 parent 5344a38 commit 101882d

File tree

3 files changed

+35
-6
lines changed

3 files changed

+35
-6
lines changed

bazel/boringssl-bssl-compat.patch

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/BUILD.bazel b/BUILD.bazel
2+
index b7dc359..cd87639 100644
3+
--- a/BUILD.bazel
4+
+++ b/BUILD.bazel
5+
@@ -66,6 +66,11 @@ license(
6+
7+
exports_files(["LICENSE"])
8+
9+
+# Export additional files for bssl-compat layer
10+
+exports_files(glob(["include/**/*"]))
11+
+exports_files(glob(["crypto/**/*"]))
12+
+exports_files(glob(["ssl/**/*"]))
13+
+
14+
bssl_cc_library(
15+
name = "crypto",
16+
srcs = bcm_sources + crypto_sources,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/include/openssl/target.h b/include/openssl/target.h
2+
index 8d4763d..79f52ba 100644
3+
--- a/include/openssl/target.h
4+
+++ b/include/openssl/target.h
5+
@@ -54,6 +54,10 @@
6+
#define OPENSSL_32_BIT
7+
#elif defined(__myriad2__)
8+
#define OPENSSL_32_BIT
9+
+#elif defined(__s390__) || defined(__s390x__) || defined(__zarch__)
10+
+#define OPENSSL_64_BIT
11+
+#elif defined(__ppc64le__) || defined(__ARCH_PPC64LE__) || defined(_ARCH_PPC64)
12+
+#define OPENSSL_64_BIT
13+
#else
14+
// The list above enumerates the platforms that BoringSSL supports. For these
15+
// platforms we keep a reasonable bar of not breaking them: automated test

bazel/repositories.bzl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,11 @@ def envoy_dependencies(skip_targets = []):
264264
def _boringssl():
265265
external_http_archive(
266266
name = "boringssl",
267-
patch_cmds = [
268-
# Enable bssl-compat to copy out & use parts of the source tree
269-
# that don't get exported from the bazel BUILD file by default.
270-
"""echo 'exports_files(glob(["crypto/**/*"]))' >> BUILD.bazel""",
271-
"""echo 'exports_files(glob(["ssl/**/*"]))' >> BUILD.bazel""",
272-
"""echo 'exports_files(glob(["include/**/*"]))' >> BUILD.bazel""",
267+
patches = [
268+
"@envoy//bazel:boringssl-bssl-compat.patch",
269+
"@envoy//bazel:boringssl-s390x-ppc64le.patch",
273270
],
271+
patch_args = ["-p1"],
274272
)
275273

276274
def _boringssl_fips():

0 commit comments

Comments
 (0)