summaryrefslogtreecommitdiff
path: root/sci-libs/tensorflow/files/tensorflow-2.14.1-0004-tensorflow_cc-Add-systemlib-nsync-linkopts.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/tensorflow/files/tensorflow-2.14.1-0004-tensorflow_cc-Add-systemlib-nsync-linkopts.patch')
-rw-r--r--sci-libs/tensorflow/files/tensorflow-2.14.1-0004-tensorflow_cc-Add-systemlib-nsync-linkopts.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/sci-libs/tensorflow/files/tensorflow-2.14.1-0004-tensorflow_cc-Add-systemlib-nsync-linkopts.patch b/sci-libs/tensorflow/files/tensorflow-2.14.1-0004-tensorflow_cc-Add-systemlib-nsync-linkopts.patch
new file mode 100644
index 000000000000..0fa4d02d4c62
--- /dev/null
+++ b/sci-libs/tensorflow/files/tensorflow-2.14.1-0004-tensorflow_cc-Add-systemlib-nsync-linkopts.patch
@@ -0,0 +1,35 @@
+From e6645115b8a838b40a49c73cb948dc373c5e98c8 Mon Sep 17 00:00:00 2001
+From: wangjiezhe <wangjiezhe@gmail.com>
+Date: Fri, 24 Nov 2023 16:42:48 +0800
+Subject: [PATCH 04/13] tensorflow_cc: Add systemlib nsync linkopts
+
+Linkopts dont get propagated up to the shared library correctly so
+workaround by applying them directly
+---
+ tensorflow/BUILD | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tensorflow/BUILD b/tensorflow/BUILD
+index 202553cd531..63ce1e7b385 100644
+--- a/tensorflow/BUILD
++++ b/tensorflow/BUILD
+@@ -39,6 +39,7 @@ load(
+ "tf_cc_shared_library",
+ )
+ load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda")
++load("@local_config_syslibs//:build_defs.bzl", "if_system_lib")
+
+ # copybara:uncomment_begin
+ # load("//devtools/copybara/rules:copybara.bzl", "copybara_config_test")
+@@ -1312,7 +1313,7 @@ tf_cc_shared_library(
+ "-z defs",
+ "-Wl,--version-script,$(location //tensorflow:tf_version_script.lds)",
+ ],
+- }),
++ }) + if_system_lib("nsync", ["-lnsync_cpp"]),
+ per_os_targets = True,
+ roots = [
+ "//tensorflow/c:c_api",
+--
+2.41.0
+