third_party/linux: use toolchain-bundle for linux kernel build

This contains lots of workarounds and should be migrated to a native
bazel integration.

Change-Id: Ib0a52daf3879df4d5369541475c42fa506a54328
Reviewed-on: https://review.monogon.dev/c/monogon/+/4101
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/build/utils/target_info.bzl b/build/utils/target_info.bzl
new file mode 100644
index 0000000..184b06c
--- /dev/null
+++ b/build/utils/target_info.bzl
@@ -0,0 +1,23 @@
+TargetInfo = provider(
+    "A simple provider to hold target information.",
+    fields = {
+        "value": "The value of the target information.",
+    },
+)
+
+def _target_info_impl(ctx):
+    return [
+        TargetInfo(
+            value = ctx.attr.value,
+        ),
+    ]
+
+target_info = rule(
+    implementation = _target_info_impl,
+    attrs = {
+        "value": attr.string(
+            mandatory = True,
+        ),
+    },
+    doc = "A simple rule to determine a target information based on selects.",
+)