summarylogtreecommitdiffstats
path: root/gcc1.diff
diff options
context:
space:
mode:
Diffstat (limited to 'gcc1.diff')
-rw-r--r--gcc1.diff81
1 files changed, 81 insertions, 0 deletions
diff --git a/gcc1.diff b/gcc1.diff
new file mode 100644
index 000000000000..3c06a0103b19
--- /dev/null
+++ b/gcc1.diff
@@ -0,0 +1,81 @@
+diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
+index 44a95d6bad..0fb9e9fd29 100644
+--- a/tensorflow/workspace.bzl
++++ b/tensorflow/workspace.bzl
+@@ -461,6 +461,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
+ ],
+ sha256 = "895b31310e718a61f7335759a778c068a6edde1c089883598a0830cbb7075673",
+ strip_prefix = "grpc-d184fa229d75d336aedea0041bd59cb93e7e267f",
++ patch_file = clean_dep("//third_party/grpc:gcc9.patch"),
+ )
+
+
+diff --git a/third_party/grpc/gcc9.patch b/third_party/grpc/gcc9.patch
+new file mode 100644
+index 0000000000..9a3d737ab0
+--- /dev/null
++++ b/third_party/grpc/gcc9.patch
+@@ -0,0 +1,63 @@
++diff -ruN a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc
++--- a/src/core/lib/gpr/log_linux.cc 2018-04-13 17:28:21.000000000 +0200
+++++ b/src/core/lib/gpr/log_linux.cc 2019-10-23 21:32:10.956028386 +0200
++@@ -40,7 +40,7 @@
++ #include <time.h>
++ #include <unistd.h>
++
++-static long gettid(void) { return syscall(__NR_gettid); }
+++static long sys_gettid(void) { return syscall(__NR_gettid); }
++
++ void gpr_log(const char* file, int line, gpr_log_severity severity,
++ const char* format, ...) {
++@@ -70,7 +70,7 @@
++ gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
++ struct tm tm;
++ static __thread long tid = 0;
++- if (tid == 0) tid = gettid();
+++ if (tid == 0) tid = sys_gettid();
++
++ timer = static_cast<time_t>(now.tv_sec);
++ final_slash = strrchr(args->file, '/');
++diff -ruN a/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc
++--- a/src/core/lib/gpr/log_posix.cc 2018-04-13 17:28:21.000000000 +0200
+++++ b/src/core/lib/gpr/log_posix.cc 2019-10-23 21:30:10.491136918 +0200
++@@ -30,7 +30,7 @@
++ #include <string.h>
++ #include <time.h>
++
++-static intptr_t gettid(void) { return (intptr_t)pthread_self(); }
+++static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); }
++
++ void gpr_log(const char* file, int line, gpr_log_severity severity,
++ const char* format, ...) {
++@@ -85,7 +85,7 @@
++ char* prefix;
++ gpr_asprintf(&prefix, "%s%s.%09d %7tu %s:%d]",
++ gpr_log_severity_string(args->severity), time_buffer,
++- (int)(now.tv_nsec), gettid(), display_file, args->line);
+++ (int)(now.tv_nsec), sys_gettid(), display_file, args->line);
++
++ fprintf(stderr, "%-70s %s\n", prefix, args->message);
++ gpr_free(prefix);
++diff -ruN a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
++--- a/src/core/lib/iomgr/ev_epollex_linux.cc 2018-04-13 17:28:21.000000000 +0200
+++++ b/src/core/lib/iomgr/ev_epollex_linux.cc 2019-10-23 21:31:24.020053353 +0200
++@@ -986,7 +986,7 @@
++ }
++
++ #ifndef NDEBUG
++-static long gettid(void) { return syscall(__NR_gettid); }
+++static long sys_gettid(void) { return syscall(__NR_gettid); }
++ #endif
++
++ /* pollset->mu lock must be held by the caller before calling this.
++@@ -1006,7 +1006,7 @@
++ #define WORKER_PTR (&worker)
++ #endif
++ #ifndef NDEBUG
++- WORKER_PTR->originator = gettid();
+++ WORKER_PTR->originator = sys_gettid();
++ #endif
++ if (grpc_polling_trace.enabled()) {
++ gpr_log(GPR_DEBUG,