Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch boringssl for ppc64le #20791

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions tensorflow/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
],
sha256 = "524ba98a56300149696481b4cb9ddebd0c7b7ac9b9f6edee81da2d2d7e5d2bb3",
strip_prefix = "boringssl-a0fb951d2a26a8ee746b52f3ba81ab011a0af778",
patch_file = clean_dep("//third_party/boringssl:boringssl_build_file_ppc64le.patch"),
)

tf_http_archive(
Expand Down
53 changes: 53 additions & 0 deletions third_party/boringssl/boringssl_build_file_ppc64le.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
--- a/BUILD 2017-10-17 21:30:48.000000000 +0000
+++ b/BUILD 2018-01-09 12:40:36.264153992 +0000
@@ -23,6 +23,7 @@
"crypto_sources",
"crypto_sources_linux_x86_64",
"crypto_sources_mac_x86_64",
+ "crypto_sources_linux_ppc64le",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously when we asked boringssl about such patches, they told us some of these may not work at all.
Can we work with them to make sure this works, and then upstream it into boringssl?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gunan , I got the patch merged upstream into boringssl today. I'm in the process of testing the new tar.gz update in workspace.bzl, then I'll add a commit to change this PR to just use the new boringssl version.

"fips_fragments",
"ssl_headers",
"ssl_internal_headers",
@@ -46,6 +47,11 @@
values = {"cpu": "x64_windows"},
)

+config_setting(
+ name = "linux_ppc64le",
+ values = {"cpu": "ppc"},
+)
+
posix_copts = [
# Assembler option --noexecstack adds .note.GNU-stack to each object to
# ensure that binaries can be built with non-executable stack.
@@ -77,12 +83,14 @@
"-DWIN32_LEAN_AND_MEAN",
"-DOPENSSL_NO_ASM",
],
+ ":linux_ppc64le": posix_copts,
"//conditions:default": ["-DOPENSSL_NO_ASM"],
})

crypto_sources_asm = select({
":linux_x86_64": crypto_sources_linux_x86_64,
":mac_x86_64": crypto_sources_mac_x86_64,
+ ":linux_ppc64le": crypto_sources_linux_ppc64le,
"//conditions:default": [],
})

@@ -97,6 +105,7 @@
boringssl_copts_c11 = boringssl_copts + select({
":linux_x86_64": posix_copts_c11,
":mac_x86_64": posix_copts_c11,
+ ":linux_ppc64le": posix_copts_c11,
"//conditions:default": [],
})

@@ -110,6 +119,7 @@
":linux_x86_64": posix_copts_cxx,
":mac_x86_64": posix_copts_cxx,
"//conditions:default": [],
+ ":linux_ppc64le": posix_copts_cxx,
})

cc_library(