summaryrefslogtreecommitdiff
path: root/dev-util/bazel/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
commit2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch)
treec8af0fd04194aed03cf067d44e53c7edd3e9ab84 /dev-util/bazel/files
parente9d044d4b9b71200a96adfa280848858c0f468c9 (diff)
gentoo resync : 05.12.2021
Diffstat (limited to 'dev-util/bazel/files')
-rw-r--r--dev-util/bazel/files/bazel-0.22.0-include-limits-for-gcc-11.patch125
-rw-r--r--dev-util/bazel/files/bazel-0.22.0-rename-gettid-functions.patch44
-rw-r--r--dev-util/bazel/files/bazel-0.24.1-rename-gettid-functions.patch66
-rw-r--r--dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch34
4 files changed, 34 insertions, 235 deletions
diff --git a/dev-util/bazel/files/bazel-0.22.0-include-limits-for-gcc-11.patch b/dev-util/bazel/files/bazel-0.22.0-include-limits-for-gcc-11.patch
deleted file mode 100644
index e05c2263de06..000000000000
--- a/dev-util/bazel/files/bazel-0.22.0-include-limits-for-gcc-11.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-diff --git a/third_party/ijar/mapped_file_unix.cc b/third_party/ijar/mapped_file_unix.cc
-index fbfca42723..a105ee89a7 100644
---- a/third_party/ijar/mapped_file_unix.cc
-+++ b/third_party/ijar/mapped_file_unix.cc
-@@ -19,6 +19,7 @@
- #include <sys/mman.h>
-
- #include <algorithm>
-+#include <limits>
-
- #include "third_party/ijar/mapped_file.h"
-
-diff --git a/third_party/ijar/zlib_client.h b/third_party/ijar/zlib_client.h
-index ed6616362f..da0848852b 100644
---- a/third_party/ijar/zlib_client.h
-+++ b/third_party/ijar/zlib_client.h
-@@ -19,6 +19,8 @@
-
- #include "third_party/ijar/common.h"
-
-+#include <limits>
-+
- namespace devtools_ijar {
- // Try to compress a file entry in memory using the deflate algorithm.
- // It will compress buf (of size length) unless the compressed size is bigger
-diff --git a/third_party/protobuf/3.6.1/python/google/protobuf/pyext/message.cc b/third_party/protobuf/3.6.1/python/google/protobuf/pyext/message.cc
-index 5893533adf..78d964266d 100644
---- a/third_party/protobuf/3.6.1/python/google/protobuf/pyext/message.cc
-+++ b/third_party/protobuf/3.6.1/python/google/protobuf/pyext/message.cc
-@@ -33,6 +33,7 @@
-
- #include <google/protobuf/pyext/message.h>
-
-+#include <limits>
- #include <map>
- #include <memory>
- #include <string>
-diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/repeated_field.cc b/third_party/protobuf/3.6.1/src/google/protobuf/repeated_field.cc
-index 310000aabb..f95803d4f2 100644
---- a/third_party/protobuf/3.6.1/src/google/protobuf/repeated_field.cc
-+++ b/third_party/protobuf/3.6.1/src/google/protobuf/repeated_field.cc
-@@ -33,6 +33,7 @@
- // Sanjay Ghemawat, Jeff Dean, and others.
-
- #include <algorithm>
-+#include <limits>
-
- #include <google/protobuf/repeated_field.h>
- #include <google/protobuf/stubs/logging.h>
-diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/stubs/bytestream.cc b/third_party/protobuf/3.6.1/src/google/protobuf/stubs/bytestream.cc
-index f4af6a50ab..c3af6b7310 100644
---- a/third_party/protobuf/3.6.1/src/google/protobuf/stubs/bytestream.cc
-+++ b/third_party/protobuf/3.6.1/src/google/protobuf/stubs/bytestream.cc
-@@ -32,6 +32,7 @@
-
- #include <string.h>
- #include <algorithm>
-+#include <limits>
-
- namespace google {
- namespace protobuf {
-diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/util/field_comparator_test.cc b/third_party/protobuf/3.6.1/src/google/protobuf/util/field_comparator_test.cc
-index 249b8d5463..d5363c7784 100644
---- a/third_party/protobuf/3.6.1/src/google/protobuf/util/field_comparator_test.cc
-+++ b/third_party/protobuf/3.6.1/src/google/protobuf/util/field_comparator_test.cc
-@@ -42,6 +42,8 @@
- // and the opensource version gtest.h header includes cmath transitively
- // somehow.
- #include <gtest/gtest.h>
-+#include <limits>
-+
- namespace google {
- namespace protobuf {
- namespace util {
-diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/datapiece.cc b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/datapiece.cc
-index 59bc28ae71..914fe18913 100644
---- a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/datapiece.cc
-+++ b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/datapiece.cc
-@@ -38,6 +38,8 @@
- #include <google/protobuf/stubs/mathlimits.h>
- #include <google/protobuf/stubs/mathutil.h>
-
-+#include <limits>
-+
- namespace google {
- namespace protobuf {
- namespace util {
-diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/json_objectwriter_test.cc b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/json_objectwriter_test.cc
-index 0dc710c7fe..aedf26bb12 100644
---- a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/json_objectwriter_test.cc
-+++ b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/json_objectwriter_test.cc
-@@ -34,6 +34,8 @@
- #include <google/protobuf/util/internal/utility.h>
- #include <gtest/gtest.h>
-
-+#include <limits>
-+
- namespace google {
- namespace protobuf {
- namespace util {
-diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/protostream_objectwriter_test.cc b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/protostream_objectwriter_test.cc
-index 7f0df5677e..7d19608928 100644
---- a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/protostream_objectwriter_test.cc
-+++ b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/protostream_objectwriter_test.cc
-@@ -58,6 +58,8 @@
- #include <gtest/gtest.h>
-
-
-+#include <limits>
-+
- namespace google {
- namespace protobuf {
- namespace util {
-diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/utility.cc b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/utility.cc
-index b8d917ce28..5b1694503b 100644
---- a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/utility.cc
-+++ b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/utility.cc
-@@ -31,6 +31,7 @@
- #include <google/protobuf/util/internal/utility.h>
-
- #include <algorithm>
-+#include <limits>
-
- #include <google/protobuf/stubs/callback.h>
- #include <google/protobuf/stubs/common.h>
diff --git a/dev-util/bazel/files/bazel-0.22.0-rename-gettid-functions.patch b/dev-util/bazel/files/bazel-0.22.0-rename-gettid-functions.patch
deleted file mode 100644
index 0450300c2c90..000000000000
--- a/dev-util/bazel/files/bazel-0.22.0-rename-gettid-functions.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git a/third_party/grpc/src/core/support/log_linux.c b/third_party/grpc/src/core/support/log_linux.c
-index 93a0c1b4c6..367c92118e 100644
---- a/third_party/grpc/src/core/support/log_linux.c
-+++ b/third_party/grpc/src/core/support/log_linux.c
-@@ -54,7 +54,7 @@
- #include <sys/syscall.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, ...) {
-@@ -95,7 +95,7 @@ void gpr_default_log(gpr_log_func_args *args) {
-
- 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, "%-60s %s\n", prefix, args->message);
- gpr_free(prefix);
-diff --git a/third_party/grpc/src/core/support/log_posix.c b/third_party/grpc/src/core/support/log_posix.c
-index 3ff171f99c..f0420a7b3b 100644
---- a/third_party/grpc/src/core/support/log_posix.c
-+++ b/third_party/grpc/src/core/support/log_posix.c
-@@ -45,7 +45,7 @@
- #include <time.h>
- #include <pthread.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, ...) {
-@@ -95,7 +95,7 @@ void gpr_default_log(gpr_log_func_args *args) {
-
- fprintf(stderr, "%s%s.%09d %7tu %s:%d] %s\n",
- 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,
- args->message);
- }
-
diff --git a/dev-util/bazel/files/bazel-0.24.1-rename-gettid-functions.patch b/dev-util/bazel/files/bazel-0.24.1-rename-gettid-functions.patch
deleted file mode 100644
index 39cf94d94695..000000000000
--- a/dev-util/bazel/files/bazel-0.24.1-rename-gettid-functions.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-diff --git a/third_party/grpc/src/core/lib/gpr/log_linux.cc b/third_party/grpc/src/core/lib/gpr/log_linux.cc
-index 561276f0c2..8b597b4cf2 100644
---- a/third_party/grpc/src/core/lib/gpr/log_linux.cc
-+++ b/third_party/grpc/src/core/lib/gpr/log_linux.cc
-@@ -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 @@ void gpr_default_log(gpr_log_func_args* args) {
- 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 --git a/third_party/grpc/src/core/lib/gpr/log_posix.cc b/third_party/grpc/src/core/lib/gpr/log_posix.cc
-index 0acb225572..cd0b702b94 100644
---- a/third_party/grpc/src/core/lib/gpr/log_posix.cc
-+++ b/third_party/grpc/src/core/lib/gpr/log_posix.cc
-@@ -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 @@ void gpr_default_log(gpr_log_func_args* args) {
- 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 --git a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc b/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc
-index 7a4870db78..4258ded8a0 100644
---- a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc
-+++ b/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc
-@@ -1150,7 +1150,7 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
- }
-
- #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.
-@@ -1170,7 +1170,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
- #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_INFO,
diff --git a/dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch b/dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch
new file mode 100644
index 000000000000..4c8648bb639f
--- /dev/null
+++ b/dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/815907
+https://github.com/bazelbuild/bazel/commit/bcce6dd026e90336e80616a8c1004a79a2f8640c
+
+From: philwo <philwo@google.com>
+Date: Thu, 20 May 2021 08:13:09 -0700
+Subject: [PATCH] Add the TEMP_FAILURE_RETRY macro to linux-sandbox-pid1.cc.
+
+This allows us to build Bazel on Linux systems which use a C standard library that does not include this macro, like Alpine Linux (which uses musl).
+
+Fixes #12460.
+
+PiperOrigin-RevId: 374873483
+--- a/src/main/tools/linux-sandbox-pid1.cc
++++ b/src/main/tools/linux-sandbox-pid1.cc
+@@ -49,6 +49,19 @@
+ #include <linux/fs.h>
+ #endif
+
++#ifndef TEMP_FAILURE_RETRY
++// Some C standard libraries like musl do not define this macro, so we'll
++// include our own version for compatibility.
++#define TEMP_FAILURE_RETRY(exp) \
++ ({ \
++ decltype(exp) _rc; \
++ do { \
++ _rc = (exp); \
++ } while (_rc == -1 && errno == EINTR); \
++ _rc; \
++ })
++#endif // TEMP_FAILURE_RETRY
++
+ #include "src/main/tools/linux-sandbox-options.h"
+ #include "src/main/tools/linux-sandbox.h"
+ #include "src/main/tools/logging.h"