File tensorflow-2.6.0-removed-clog-build-as-included-in-cpuinfo.patch of Package tensorflow2

--- a/tensorflow-2.6.0/tensorflow/tools/pip_package/BUILD
+++ b/tensorflow-2.6.0/tensorflow/tools/pip_package/BUILD
@@ -224,7 +224,6 @@ filegroup(
         "@termcolor_archive//:COPYING.txt",
         "@typing_extensions_archive//:LICENSE",
         "@zlib//:zlib.h",
-        "@clog//:LICENSE",
         "@cpuinfo//:LICENSE",
     ] + select({
         "//tensorflow:android": [],
--- a/tensorflow-2.6.0/tensorflow/workspace2.bzl
+++ b/tensorflow-2.6.0/tensorflow/workspace2.bzl
@@ -19,7 +19,6 @@ load("//tensorflow/tools/def_file_filter
 load("//third_party/FP16:workspace.bzl", FP16 = "repo")
 load("//third_party/absl:workspace.bzl", absl = "repo")
 load("//third_party/aws:workspace.bzl", aws = "repo")
-load("//third_party/clog:workspace.bzl", clog = "repo")
 load("//third_party/cpuinfo:workspace.bzl", cpuinfo = "repo")
 load("//third_party/dlpack:workspace.bzl", dlpack = "repo")
 load("//third_party/eigen3:workspace.bzl", eigen3 = "repo")
@@ -55,7 +54,6 @@ def _initialize_third_party():
     FP16()
     absl()
     aws()
-    clog()
     cpuinfo()
     dlpack()
     eigen3()
--- a/tensorflow-2.6.0/third_party/clog/BUILD
+++ /dev/null
@@ -1 +0,0 @@
-# This empty BUILD file is required to make Bazel treat this directory as a package.
--- a/tensorflow-2.6.0/third_party/clog/BUILD.bazel
+++ /dev/null
@@ -1,55 +0,0 @@
-# Description:
-#   C-style (a-la printf) logging library
-
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])
-
-exports_files(["LICENSE"])
-
-cc_library(
-    name = "clog",
-    srcs = [
-        "deps/clog/src/clog.c",
-    ],
-    hdrs = [
-        "deps/clog/include/clog.h",
-    ],
-    copts = select({
-        ":windows": [],
-        "//conditions:default": ["-Wno-unused-result"],
-    }),
-    defines = select({
-        # When linkstatic=False, we need default visibility
-        ":macos_x86_64": ["CLOG_VISIBILITY="],
-        "//conditions:default": [],
-    }),
-    linkopts = select({
-        ":android": ["-llog"],
-        "//conditions:default": [],
-    }),
-    linkstatic = select({
-        # https://github.com/bazelbuild/bazel/issues/11552
-        ":macos_x86_64": False,
-        "//conditions:default": True,
-    }),
-    strip_include_prefix = "deps/clog/include",
-)
-
-config_setting(
-    name = "android",
-    values = {"crosstool_top": "//external:android/crosstool"},
-)
-
-config_setting(
-    name = "windows",
-    values = {"cpu": "x64_windows"},
-)
-
-config_setting(
-    name = "macos_x86_64",
-    values = {
-        "apple_platform_type": "macos",
-        "cpu": "darwin",
-    },
-)
--- a/tensorflow-2.6.0/third_party/clog/workspace.bzl
+++ /dev/null
@@ -1,15 +0,0 @@
-"""Loads the clog library, used by cpuinfo and XNNPACK."""
-
-load("//third_party:repo.bzl", "tf_http_archive")
-
-def repo():
-    tf_http_archive(
-        name = "clog",
-        strip_prefix = "cpuinfo-d5e37adf1406cf899d7d9ec1d317c47506ccb970",
-        sha256 = "3f2dc1970f397a0e59db72f9fca6ff144b216895c1d606f6c94a507c1e53a025",
-        urls = [
-            "https://storage.googleapis.com/mirror.tensorflow.org/github.com/pytorch/cpuinfo/archive/d5e37adf1406cf899d7d9ec1d317c47506ccb970.tar.gz",
-            "https://github.com/pytorch/cpuinfo/archive/d5e37adf1406cf899d7d9ec1d317c47506ccb970.tar.gz",
-        ],
-        build_file = "//third_party/clog:BUILD.bazel",
-    )
--- a/tensorflow-2.6.0/third_party/cpuinfo/BUILD.bazel
+++ b/tensorflow-2.6.0/third_party/cpuinfo/BUILD.bazel
@@ -160,7 +160,7 @@ cc_library(
         "src/arm/midr.h",
     ],
     deps = [
-        "@clog",
+        ":cpuinfo_clog",
     ],
 )
 
@@ -185,6 +185,35 @@ cc_library(
     ],
 )
 
+cc_library(
+    name = "cpuinfo_clog",
+    srcs = [
+        "deps/clog/src/clog.c",
+    ],
+    hdrs = [
+        "deps/clog/include/clog.h",
+    ],
+    copts = select({
+        ":windows_x86_64": [],
+        "//conditions:default": ["-Wno-unused-result"],
+    }),
+    defines = select({
+        # When linkstatic=False, we need default visibility
+        ":macos_x86_64": ["CLOG_VISIBILITY="],
+        "//conditions:default": [],
+    }),
+    linkopts = select({
+        ":android_arm64": ["-llog"],
+        "//conditions:default": [],
+    }),
+    linkstatic = select({
+        # https://github.com/bazelbuild/bazel/issues/11552
+        ":macos_x86_64": False,
+        "//conditions:default": True,
+    }),
+    strip_include_prefix = "deps/clog/include",
+)
+
 ############################# Build configurations #############################
 
 config_setting(
openSUSE Build Service is sponsored by