@@ -, +, @@ --- dev-util/bazel/bazel-0.22.0.ebuild | 6 +- dev-util/bazel/bazel-0.24.1.ebuild | 6 +- dev-util/bazel/bazel-0.27.2.ebuild | 6 +- dev-util/bazel/bazel-0.29.1.ebuild | 13 +- dev-util/bazel/bazel-1.0.1.ebuild | 6 +- dev-util/bazel/bazel-1.2.0-r1.ebuild | 114 ---------------- dev-util/bazel/bazel-1.2.0.ebuild | 109 --------------- dev-util/bazel/bazel-1.2.1.ebuild | 13 +- ...{bazel-2.0.0.ebuild => bazel-2.0.1.ebuild} | 5 +- dev-util/bazel/bazel-3.2.0.ebuild | 5 +- dev-util/bazel/bazel-3.7.2.ebuild | 5 +- ...zel-0.22.0-include-limits-for-gcc-11.patch | 125 ++++++++++++++++++ ...bazel-0.22.0-rename-gettid-functions.patch | 44 ++++++ ...bazel-0.24.1-rename-gettid-functions.patch | 66 +++++++++ ...azel-3.2.0-include-limits-for-gcc-11.patch | 25 ++++ 15 files changed, 304 insertions(+), 244 deletions(-) delete mode 100644 dev-util/bazel/bazel-1.2.0-r1.ebuild delete mode 100644 dev-util/bazel/bazel-1.2.0.ebuild rename dev-util/bazel/{bazel-2.0.0.ebuild => bazel-2.0.1.ebuild} (96%) create mode 100644 dev-util/bazel/files/bazel-0.22.0-include-limits-for-gcc-11.patch create mode 100644 dev-util/bazel/files/bazel-0.22.0-rename-gettid-functions.patch create mode 100644 dev-util/bazel/files/bazel-0.24.1-rename-gettid-functions.patch create mode 100644 dev-util/bazel/files/bazel-3.2.0-include-limits-for-gcc-11.patch --- a/dev-util/bazel/bazel-0.22.0.ebuild +++ a/dev-util/bazel/bazel-0.22.0.ebuild @@ -43,8 +43,9 @@ bazel-get-flags() { } pkg_setup() { - echo ${PATH} | grep -q ccache && \ + if has ccache ${FEATURES}; then ewarn "${PN} usually fails to compile with ccache, you have been warned" + fi java-pkg-2_pkg_setup } @@ -76,6 +77,9 @@ src_prepare() { test --verbose_failures --verbose_test_summary test --spawn_strategy=standalone --genrule_strategy=standalone EOF + + eapply "${FILESDIR}/${P}-rename-gettid-functions.patch" + eapply "${FILESDIR}/${P}-include-limits-for-gcc-11.patch" } src_compile() { --- a/dev-util/bazel/bazel-0.24.1.ebuild +++ a/dev-util/bazel/bazel-0.24.1.ebuild @@ -43,8 +43,9 @@ bazel-get-flags() { } pkg_setup() { - echo ${PATH} | grep -q ccache && \ + if has ccache ${FEATURES}; then ewarn "${PN} usually fails to compile with ccache, you have been warned" + fi java-pkg-2_pkg_setup } @@ -76,6 +77,9 @@ src_prepare() { test --verbose_failures --verbose_test_summary test --spawn_strategy=standalone --genrule_strategy=standalone EOF + + eapply "${FILESDIR}/${P}-rename-gettid-functions.patch" + eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch" } src_compile() { --- a/dev-util/bazel/bazel-0.27.2.ebuild +++ a/dev-util/bazel/bazel-0.27.2.ebuild @@ -43,8 +43,9 @@ bazel-get-flags() { } pkg_setup() { - echo ${PATH} | grep -q ccache && \ + if has ccache ${FEATURES}; then ewarn "${PN} usually fails to compile with ccache, you have been warned" + fi java-pkg-2_pkg_setup } @@ -63,6 +64,9 @@ src_prepare() { # R: /proc/24939/setgroups # C: /usr/lib/systemd/systemd addpredict /proc + + eapply "${FILESDIR}/${PN}-0.24.1-rename-gettid-functions.patch" + eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch" } src_compile() { --- a/dev-util/bazel/bazel-0.29.1.ebuild +++ a/dev-util/bazel/bazel-0.29.1.ebuild @@ -8,9 +8,7 @@ inherit bash-completion-r1 java-pkg-2 multiprocessing DESCRIPTION="Fast and correct automated build system" HOMEPAGE="https://bazel.build/" -GLIBC_GETTID_PATCH="${P}-rename-gettid-functions.patch" -SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip - https://raw.githubusercontent.com/clearlinux-pkgs/bazel/adefd9046582cb52f39579033132e6265ef6ddb0/rename-gettid-functions.patch -> ${GLIBC_GETTID_PATCH}" +SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip" LICENSE="Apache-2.0" SLOT="0" @@ -45,17 +43,15 @@ bazel-get-flags() { } pkg_setup() { - echo ${PATH} | grep -q ccache && \ + if has ccache ${FEATURES}; then ewarn "${PN} usually fails to compile with ccache, you have been warned" + fi java-pkg-2_pkg_setup } src_unpack() { # Only unpack the main distfile unpack ${P}-dist.zip - pushd third_party/grpc/src >/dev/null || die - eapply "${DISTDIR}/${GLIBC_GETTID_PATCH}" - popd >/dev/null || die } src_prepare() { @@ -68,6 +64,9 @@ src_prepare() { # R: /proc/24939/setgroups # C: /usr/lib/systemd/systemd addpredict /proc + + eapply "${FILESDIR}/${PN}-0.24.1-rename-gettid-functions.patch" + eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch" } src_compile() { --- a/dev-util/bazel/bazel-1.0.1.ebuild +++ a/dev-util/bazel/bazel-1.0.1.ebuild @@ -43,8 +43,9 @@ bazel-get-flags() { } pkg_setup() { - echo ${PATH} | grep -q ccache && \ + if has ccache ${FEATURES}; then ewarn "${PN} usually fails to compile with ccache, you have been warned" + fi java-pkg-2_pkg_setup } @@ -63,6 +64,9 @@ src_prepare() { # R: /proc/24939/setgroups # C: /usr/lib/systemd/systemd addpredict /proc + + eapply "${FILESDIR}/${PN}-0.24.1-rename-gettid-functions.patch" + eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch" } src_compile() { --- a/dev-util/bazel/bazel-1.2.0-r1.ebuild +++ a/dev-util/bazel/bazel-1.2.0-r1.ebuild @@ -1,114 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit bash-completion-r1 java-pkg-2 multiprocessing - -DESCRIPTION="Fast and correct automated build system" -HOMEPAGE="https://bazel.build/" - -GLIBC_GETTID_PATCH="${P}-rename-gettid-functions.patch" -SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip - https://raw.githubusercontent.com/clearlinux-pkgs/bazel/adefd9046582cb52f39579033132e6265ef6ddb0/rename-gettid-functions.patch -> ${GLIBC_GETTID_PATCH}" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64" -IUSE="examples tools" -# strip corrupts the bazel binary -# test fails with network-sandbox: An error occurred during the fetch of repository 'io_bazel_skydoc' (bug 690794) -RESTRICT="strip test" -RDEPEND=">=virtual/jdk-1.8:*" -DEPEND="${RDEPEND} - app-arch/unzip - app-arch/zip" - -S="${WORKDIR}" - -bazel-get-flags() { - local i fs=() - for i in ${CFLAGS}; do - fs+=( "--copt=${i}" "--host_copt=${i}" ) - done - for i in ${CXXFLAGS}; do - fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" ) - done - for i in ${CPPFLAGS}; do - fs+=( "--copt=${i}" "--host_copt=${i}" ) - fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" ) - done - for i in ${LDFLAGS}; do - fs+=( "--linkopt=${i}" "--host_linkopt=${i}" ) - done - echo "${fs[*]}" -} - -pkg_setup() { - echo ${PATH} | grep -q ccache && \ - ewarn "${PN} usually fails to compile with ccache, you have been warned" - java-pkg-2_pkg_setup -} - -src_unpack() { - # Only unpack the main distfile - unpack ${P}-dist.zip - pushd third_party/grpc/src >/dev/null || die - eapply "${DISTDIR}/${GLIBC_GETTID_PATCH}" - popd >/dev/null || die -} - -src_prepare() { - default - - # F: fopen_wr - # S: deny - # P: /proc/self/setgroups - # A: /proc/self/setgroups - # R: /proc/24939/setgroups - # C: /usr/lib/systemd/systemd - addpredict /proc -} - -src_compile() { - export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) $(bazel-get-flags) --host_javabase=@local_jdk//:jdk" - VERBOSE=yes ./compile.sh || die - - ./scripts/generate_bash_completion.sh \ - --bazel=output/bazel \ - --output=bazel-complete.bash \ - --prepend=scripts/bazel-complete-header.bash \ - --prepend=scripts/bazel-complete-template.bash -} - -src_test() { - output/bazel test \ - --verbose_failures \ - --spawn_strategy=standalone \ - --genrule_strategy=standalone \ - --verbose_test_summary \ - examples/cpp:hello-success_test || die - output/bazel shutdown -} - -src_install() { - dobin output/bazel - newbashcomp bazel-complete.bash ${PN} - bashcomp_alias ${PN} ibazel - insinto /usr/share/zsh/site-functions - doins scripts/zsh_completion/_bazel - - if use examples; then - docinto examples - dodoc -r examples/* - docompress -x /usr/share/doc/${PF}/examples - fi - # could really build tools but I don't know which ones - # are actually used - if use tools; then - docinto tools - dodoc -r tools/* - docompress -x /usr/share/doc/${PF}/tools - docompress -x /usr/share/doc/${PF}/tools/build_defs/pkg/testdata - fi -} --- a/dev-util/bazel/bazel-1.2.0.ebuild +++ a/dev-util/bazel/bazel-1.2.0.ebuild @@ -1,109 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit bash-completion-r1 java-pkg-2 multiprocessing - -DESCRIPTION="Fast and correct automated build system" -HOMEPAGE="https://bazel.build/" - -SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64" -IUSE="examples tools" -# strip corrupts the bazel binary -# test fails with network-sandbox: An error occurred during the fetch of repository 'io_bazel_skydoc' (bug 690794) -RESTRICT="strip test" -RDEPEND=">=virtual/jdk-1.8:*" -DEPEND="${RDEPEND} - app-arch/unzip - app-arch/zip" - -S="${WORKDIR}" - -bazel-get-flags() { - local i fs=() - for i in ${CFLAGS}; do - fs+=( "--copt=${i}" "--host_copt=${i}" ) - done - for i in ${CXXFLAGS}; do - fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" ) - done - for i in ${CPPFLAGS}; do - fs+=( "--copt=${i}" "--host_copt=${i}" ) - fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" ) - done - for i in ${LDFLAGS}; do - fs+=( "--linkopt=${i}" "--host_linkopt=${i}" ) - done - echo "${fs[*]}" -} - -pkg_setup() { - echo ${PATH} | grep -q ccache && \ - ewarn "${PN} usually fails to compile with ccache, you have been warned" - java-pkg-2_pkg_setup -} - -src_unpack() { - # Only unpack the main distfile - unpack ${P}-dist.zip -} - -src_prepare() { - default - - # F: fopen_wr - # S: deny - # P: /proc/self/setgroups - # A: /proc/self/setgroups - # R: /proc/24939/setgroups - # C: /usr/lib/systemd/systemd - addpredict /proc -} - -src_compile() { - export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) $(bazel-get-flags) --host_javabase=@local_jdk//:jdk" - VERBOSE=yes ./compile.sh || die - - ./scripts/generate_bash_completion.sh \ - --bazel=output/bazel \ - --output=bazel-complete.bash \ - --prepend=scripts/bazel-complete-header.bash \ - --prepend=scripts/bazel-complete-template.bash -} - -src_test() { - output/bazel test \ - --verbose_failures \ - --spawn_strategy=standalone \ - --genrule_strategy=standalone \ - --verbose_test_summary \ - examples/cpp:hello-success_test || die - output/bazel shutdown -} - -src_install() { - dobin output/bazel - newbashcomp bazel-complete.bash ${PN} - bashcomp_alias ${PN} ibazel - insinto /usr/share/zsh/site-functions - doins scripts/zsh_completion/_bazel - - if use examples; then - docinto examples - dodoc -r examples/* - docompress -x /usr/share/doc/${PF}/examples - fi - # could really build tools but I don't know which ones - # are actually used - if use tools; then - docinto tools - dodoc -r tools/* - docompress -x /usr/share/doc/${PF}/tools - docompress -x /usr/share/doc/${PF}/tools/build_defs/pkg/testdata - fi -} --- a/dev-util/bazel/bazel-1.2.1.ebuild +++ a/dev-util/bazel/bazel-1.2.1.ebuild @@ -8,9 +8,7 @@ inherit bash-completion-r1 java-pkg-2 multiprocessing DESCRIPTION="Fast and correct automated build system" HOMEPAGE="https://bazel.build/" -GLIBC_GETTID_PATCH="${PN}-1.2.0-rename-gettid-functions.patch" -SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip - https://raw.githubusercontent.com/clearlinux-pkgs/bazel/adefd9046582cb52f39579033132e6265ef6ddb0/rename-gettid-functions.patch -> ${GLIBC_GETTID_PATCH}" +SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip" LICENSE="Apache-2.0" SLOT="0" @@ -45,17 +43,15 @@ bazel-get-flags() { } pkg_setup() { - echo ${PATH} | grep -q ccache && \ + if has ccache ${FEATURES}; then ewarn "${PN} usually fails to compile with ccache, you have been warned" + fi java-pkg-2_pkg_setup } src_unpack() { # Only unpack the main distfile unpack ${P}-dist.zip - pushd third_party/grpc/src >/dev/null || die - eapply "${DISTDIR}/${GLIBC_GETTID_PATCH}" - popd >/dev/null || die } src_prepare() { @@ -68,6 +64,9 @@ src_prepare() { # R: /proc/24939/setgroups # C: /usr/lib/systemd/systemd addpredict /proc + + eapply "${FILESDIR}/${PN}-0.24.1-rename-gettid-functions.patch" + eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch" } src_compile() { --- a/dev-util/bazel/bazel-2.0.0.ebuild +++ a/dev-util/bazel/bazel-2.0.0.ebuild @@ -43,8 +43,9 @@ bazel-get-flags() { } pkg_setup() { - echo ${PATH} | grep -q ccache && \ + if has ccache ${FEATURES}; then ewarn "${PN} usually fails to compile with ccache, you have been warned" + fi java-pkg-2_pkg_setup } @@ -63,6 +64,8 @@ src_prepare() { # R: /proc/24939/setgroups # C: /usr/lib/systemd/systemd addpredict /proc + + eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch" } src_compile() { --- a/dev-util/bazel/bazel-3.2.0.ebuild +++ a/dev-util/bazel/bazel-3.2.0.ebuild @@ -44,8 +44,9 @@ bazel-get-flags() { } pkg_setup() { - echo ${PATH} | grep -q ccache && \ + if has ccache ${FEATURES}; then ewarn "${PN} usually fails to compile with ccache, you have been warned" + fi java-pkg-2_pkg_setup } @@ -64,6 +65,8 @@ src_prepare() { # R: /proc/24939/setgroups # C: /usr/lib/systemd/systemd addpredict /proc + + eapply "${FILESDIR}/${P}-include-limits-for-gcc-11.patch" } src_compile() { --- a/dev-util/bazel/bazel-3.7.2.ebuild +++ a/dev-util/bazel/bazel-3.7.2.ebuild @@ -44,8 +44,9 @@ bazel-get-flags() { } pkg_setup() { - echo ${PATH} | grep -q ccache && \ + if has ccache ${FEATURES}; then ewarn "${PN} usually fails to compile with ccache, you have been warned" + fi java-pkg-2_pkg_setup } @@ -64,6 +65,8 @@ src_prepare() { # R: /proc/24939/setgroups # C: /usr/lib/systemd/systemd addpredict /proc + + eapply "${FILESDIR}/${PN}-3.2.0-include-limits-for-gcc-11.patch" } src_compile() { --- a/dev-util/bazel/files/bazel-0.22.0-include-limits-for-gcc-11.patch +++ a/dev-util/bazel/files/bazel-0.22.0-include-limits-for-gcc-11.patch @@ -0,0 +1,125 @@ +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 + + #include ++#include + + #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 ++ + 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 + ++#include + #include + #include + #include +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 ++#include + + #include + #include +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 + #include ++#include + + 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 ++#include ++ + 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 + #include + ++#include ++ + 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 + #include + ++#include ++ + 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 + + ++#include ++ + 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 + + #include ++#include + + #include + #include --- a/dev-util/bazel/files/bazel-0.22.0-rename-gettid-functions.patch +++ a/dev-util/bazel/files/bazel-0.22.0-rename-gettid-functions.patch @@ -0,0 +1,44 @@ +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 + #include + +-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 + #include + +-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); + } + --- a/dev-util/bazel/files/bazel-0.24.1-rename-gettid-functions.patch +++ a/dev-util/bazel/files/bazel-0.24.1-rename-gettid-functions.patch @@ -0,0 +1,66 @@ +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 + #include + +-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(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 + #include + +-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, --- a/dev-util/bazel/files/bazel-3.2.0-include-limits-for-gcc-11.patch +++ a/dev-util/bazel/files/bazel-3.2.0-include-limits-for-gcc-11.patch @@ -0,0 +1,25 @@ +diff --git a/third_party/ijar/mapped_file_unix.cc b/third_party/ijar/mapped_file_unix.cc +index 6e3a908718..030e9ca59f 100644 +--- a/third_party/ijar/mapped_file_unix.cc ++++ b/third_party/ijar/mapped_file_unix.cc +@@ -19,6 +19,7 @@ + #include + + #include ++#include + + #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 ++ + 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 --