From 3218c1db82718a54e4d41de493d006eaa3ba445c Mon Sep 17 00:00:00 2001 From: "William D. Irons" Date: Sat, 14 Jul 2018 19:20:47 +0000 Subject: [PATCH] Add support for building ppc64le with bazel This commit is to allow Tensorflow to build with boringssl on ppc64le and RHEL7.5/gcc 4.8.5. All the instructions used by linux_x86_64 also need to bet set for linux_ppc64le Change-Id: I4ccf8a61fe3bdd0a49944b48ce7863b97f957a85 Reviewed-on: https://boringssl-review.googlesource.com/29784 Reviewed-by: Adam Langley --- util/BUILD.toplevel | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/util/BUILD.toplevel b/util/BUILD.toplevel index 6691f717..d7c731bf 100644 --- a/util/BUILD.toplevel +++ b/util/BUILD.toplevel @@ -22,6 +22,7 @@ load( "crypto_internal_headers", "crypto_sources", "crypto_sources_linux_x86_64", + "crypto_sources_linux_ppc64le", "crypto_sources_mac_x86_64", "fips_fragments", "ssl_headers", @@ -36,6 +37,11 @@ config_setting( values = {"cpu": "k8"}, ) +config_setting( + name = "linux_ppc64le", + values = {"cpu": "ppc"}, +) + config_setting( name = "mac_x86_64", values = {"cpu": "darwin"}, @@ -77,6 +83,7 @@ posix_copts = [ boringssl_copts = select({ ":linux_x86_64": posix_copts, + ":linux_ppc64le": posix_copts, ":mac_x86_64": posix_copts, ":windows_x86_64": [ "-DWIN32_LEAN_AND_MEAN", @@ -87,6 +94,7 @@ boringssl_copts = select({ crypto_sources_asm = select({ ":linux_x86_64": crypto_sources_linux_x86_64, + ":linux_ppc64le": crypto_sources_linux_ppc64le, ":mac_x86_64": crypto_sources_mac_x86_64, "//conditions:default": [], }) @@ -101,6 +109,7 @@ posix_copts_c11 = [ boringssl_copts_c11 = boringssl_copts + select({ ":linux_x86_64": posix_copts_c11, + ":linux_ppc64le": posix_copts_c11, ":mac_x86_64": posix_copts_c11, "//conditions:default": [], }) @@ -113,6 +122,7 @@ posix_copts_cxx = [ boringssl_copts_cxx = boringssl_copts + select({ ":linux_x86_64": posix_copts_cxx, + ":linux_ppc64le": posix_copts_cxx, ":mac_x86_64": posix_copts_cxx, "//conditions:default": [], })