Switch to a preconfigured Clang for k8 and armv7

This one reuses more of Bazel's builtin features to remain up to date
more easily, and it's easier to expand support for more platforms. This
also takes care of upgrading to a newer Clang.

This will require updating to raspios bullseye on the Raspberry Pis.
This also renames armhf-debian to armv7 to match the broader Bazel
ecosystem's name for this architecture.

Change-Id: I3e2a4f4efea43e76314ca34a9293c7b4b45edd2c
Signed-off-by: Brian Silverman <bsilver16834@gmail.com>
diff --git a/tools/ci/buildkite.yaml b/tools/ci/buildkite.yaml
index 8532a75..b2ee1e3 100644
--- a/tools/ci/buildkite.yaml
+++ b/tools/ci/buildkite.yaml
@@ -24,10 +24,10 @@
       - tools/ci/clean-disk.sh
       - tools/bazel ${STARTUP} --output_base=../roborio_output_base build ${COMMON} --config=roborio ${ROBORIO_TARGETS}
 
-  - label: "armhf-debian"
+  - label: "armv7"
     commands:
       - tools/ci/clean-disk.sh
-      - tools/bazel ${STARTUP} --output_base=../armhf-debian_output_base build ${COMMON} --config=armhf-debian ${TARGETS}
+      - tools/bazel ${STARTUP} --output_base=../armv7_output_base build ${COMMON} --config=armv7 ${TARGETS}
 
   - label: "cortex-m4f"
     commands:
diff --git a/tools/cpp/BUILD b/tools/cpp/BUILD
index 0fe1512..17f218e 100644
--- a/tools/cpp/BUILD
+++ b/tools/cpp/BUILD
@@ -5,8 +5,8 @@
 cc_toolchain_suite(
     name = "toolchain",
     toolchains = {
-        "k8": ":cc-compiler-k8",
-        "armhf-debian": ":cc-compiler-armhf-debian",
+        "k8": "@llvm_toolchain//:cc-clang-x86_64-linux",
+        "armv7": "@llvm_toolchain//:cc-clang-armv7-linux",
         "roborio": ":cc-compiler-roborio",
         "cortex-m4f": ":cc-compiler-cortex-m4f",
         "rp2040": ":cc-compiler-rp2040",
@@ -21,11 +21,9 @@
     )
     for cpu in [
         "armeabi-v7a",
-        "armhf-debian",
         "cortex-m4f",
         "cortex-m4f-k22",
         "rp2040",
-        "k8",
         "roborio",
     ]
 ]
@@ -74,83 +72,6 @@
 )
 
 filegroup(
-    name = "clang_6p0_all_files",
-    srcs = [
-        ":flags_compiler_inputs",
-        "//tools/cpp/clang_6p0:as",
-        "//tools/cpp/clang_6p0:tool-wrappers",
-        "@clang_6p0_repo//:compiler_pieces",
-    ],
-)
-
-filegroup(
-    name = "clang_6p0_ar_files",
-    srcs = [
-        "//tools/cpp/clang_6p0:ar",
-        "@clang_6p0_repo//:compiler_pieces",
-    ],
-)
-
-filegroup(
-    name = "clang_6p0_linker_files",
-    srcs = [
-        "//tools/cpp/clang_6p0:ar",
-        "//tools/cpp/clang_6p0:clang",
-        "//tools/cpp/clang_6p0:clang-symlinks",
-        "//tools/cpp/clang_6p0:ld",
-        "@clang_6p0_repo//:compiler_pieces",
-    ],
-)
-
-filegroup(
-    name = "clang_6p0_strip_files",
-    srcs = [
-        "//tools/cpp/clang_6p0:strip",
-        "@clang_6p0_repo//:compiler_pieces",
-    ],
-)
-
-filegroup(
-    name = "clang_6p0_compiler_files",
-    srcs = [
-        "flags_compiler_inputs",
-        "//tools/cpp/clang_6p0:clang",
-        "//tools/cpp/clang_6p0:ld",
-        "@clang_6p0_repo//:compiler_components",
-        "@clang_6p0_repo//:compiler_pieces",
-    ],
-)
-
-cc_toolchain(
-    name = "cc-compiler-k8",
-    all_files = ":clang_6p0_all_files",
-    ar_files = ":clang_6p0_ar_files",
-    as_files = ":clang_6p0_compiler_files",
-    compiler_files = ":clang_6p0_compiler_files",
-    dwp_files = ":empty",
-    linker_files = ":clang_6p0_linker_files",
-    objcopy_files = "//tools/cpp/clang_6p0:objcopy",
-    strip_files = ":clang_6p0_strip_files",
-    supports_param_files = 1,
-    toolchain_config = ":k8_toolchain_config",
-    toolchain_identifier = "k8_linux",
-)
-
-toolchain(
-    name = "cc-toolchain-k8",
-    exec_compatible_with = [
-        "@platforms//os:linux",
-        "@platforms//cpu:x86_64",
-    ],
-    target_compatible_with = [
-        "@platforms//os:linux",
-        "@platforms//cpu:x86_64",
-    ],
-    toolchain = ":cc-compiler-k8",
-    toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
-)
-
-filegroup(
     name = "roborio-compiler-files",
     srcs = [
         ":flags_compiler_inputs",
@@ -227,87 +148,6 @@
 )
 
 filegroup(
-    name = "linaro-gcc-files",
-    srcs = [
-        ":clang_6p0_all_files",
-        "//tools/cpp/linaro_linux_gcc:clang-symlinks",
-        "//tools/cpp/linaro_linux_gcc:tool-wrappers",
-        "@linaro_linux_gcc_repo//:compiler_pieces",
-    ],
-)
-
-filegroup(
-    name = "linaro_linux_linker_files",
-    srcs = [
-        ":clang_6p0_linker_files",
-        "//tools/cpp/linaro_linux_gcc:ar",
-        "//tools/cpp/linaro_linux_gcc:clang",
-        "//tools/cpp/linaro_linux_gcc:clang-ld",
-        "//tools/cpp/linaro_linux_gcc:clang-symlinks",
-        "//tools/cpp/linaro_linux_gcc:gcc",
-        "//tools/cpp/linaro_linux_gcc:ld",
-        "@linaro_linux_gcc_repo//:compiler_pieces",
-    ],
-)
-
-filegroup(
-    name = "linaro_linux_ar_files",
-    srcs = [
-        "//tools/cpp/linaro_linux_gcc:ar",
-        "@linaro_linux_gcc_repo//:compiler_pieces",
-    ],
-)
-
-filegroup(
-    name = "linaro_linux_compiler_files",
-    srcs = [
-        ":clang_6p0_compiler_files",
-        "//tools/cpp/linaro_linux_gcc:as",
-        "//tools/cpp/linaro_linux_gcc:clang",
-        "//tools/cpp/linaro_linux_gcc:gcc",
-        "//tools/cpp/linaro_linux_gcc:ld",
-        "@linaro_linux_gcc_repo//:compiler_pieces",
-    ],
-)
-
-filegroup(
-    name = "linaro_linux_strip_files",
-    srcs = [
-        "//tools/cpp/linaro_linux_gcc:strip",
-        "@linaro_linux_gcc_repo//:compiler_pieces",
-    ],
-)
-
-cc_toolchain(
-    name = "cc-compiler-armhf-debian",
-    all_files = ":linaro-gcc-files",
-    ar_files = "linaro_linux_ar_files",
-    as_files = "linaro_linux_compiler_files",
-    compiler_files = ":linaro_linux_compiler_files",
-    dwp_files = ":empty",
-    linker_files = ":linaro_linux_linker_files",
-    objcopy_files = "//tools/cpp/linaro_linux_gcc:objcopy",
-    strip_files = ":linaro_linux_strip_files",
-    supports_param_files = 1,
-    toolchain_config = ":armhf-debian_toolchain_config",
-    toolchain_identifier = "clang_linux_armhf",
-)
-
-toolchain(
-    name = "cc-toolchain-armhf-debian",
-    exec_compatible_with = [
-        "@platforms//os:linux",
-        "@platforms//cpu:x86_64",
-    ],
-    target_compatible_with = [
-        "@platforms//os:linux",
-        "//tools/platforms/hardware:raspberry_pi",
-    ],
-    toolchain = ":cc-compiler-armhf-debian",
-    toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
-)
-
-filegroup(
     name = "gcc_arm_none_eabi_none_files",
     srcs = [
         "//tools/cpp/gcc_arm_none_eabi:tool-wrappers",
diff --git a/tools/cpp/clang_6p0/BUILD b/tools/cpp/clang_6p0/BUILD
deleted file mode 100644
index 7777859..0000000
--- a/tools/cpp/clang_6p0/BUILD
+++ /dev/null
@@ -1,86 +0,0 @@
-package(default_visibility = ["//tools/cpp:__pkg__"])
-
-filegroup(
-    name = "ar",
-    srcs = [
-        "x86_64-linux-gnu-ar",
-        "@clang_6p0_repo//:ar",
-    ],
-)
-
-filegroup(
-    name = "ld",
-    srcs = [
-        "x86_64-linux-gnu-ld",
-        "@clang_6p0_repo//:ld",
-    ],
-)
-
-filegroup(
-    name = "nm",
-    srcs = [
-        "x86_64-linux-gnu-nm",
-        "@clang_6p0_repo//:nm",
-    ],
-)
-
-filegroup(
-    name = "objcopy",
-    srcs = [
-        "x86_64-linux-gnu-objcopy",
-        "@clang_6p0_repo//:objcopy",
-    ],
-)
-
-filegroup(
-    name = "objdump",
-    srcs = [
-        "x86_64-linux-gnu-objdump",
-        "@clang_6p0_repo//:objdump",
-    ],
-)
-
-filegroup(
-    name = "strip",
-    srcs = [
-        "x86_64-linux-gnu-strip",
-        "@clang_6p0_repo//:strip",
-    ],
-)
-
-filegroup(
-    name = "as",
-    srcs = [
-        "x86_64-linux-gnu-as",
-        "@clang_6p0_repo//:as",
-    ],
-)
-
-filegroup(
-    name = "clang",
-    srcs = [
-        "x86_64-linux-gnu-clang-6.0",
-        "@clang_6p0_repo//:clang",
-    ],
-)
-
-filegroup(
-    name = "tool-wrappers",
-    srcs = [
-        ":ar",
-        ":as",
-        ":clang",
-        ":ld",
-        ":nm",
-        ":objcopy",
-        ":objdump",
-        ":strip",
-    ],
-)
-
-filegroup(
-    name = "clang-symlinks",
-    srcs = glob([
-        "clang_more_libs/**",
-    ]),
-)
diff --git a/tools/cpp/clang_6p0/clang_6p0.BUILD b/tools/cpp/clang_6p0/clang_6p0.BUILD
deleted file mode 100644
index ef674c9..0000000
--- a/tools/cpp/clang_6p0/clang_6p0.BUILD
+++ /dev/null
@@ -1,114 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-filegroup(
-    name = "clang-format",
-    srcs = [
-        "usr/bin/clang-6.0",
-        ":compiler_pieces",
-    ],
-)
-
-filegroup(
-    name = "clang",
-    srcs = [
-        "usr/bin/clang-6.0",
-    ],
-)
-
-filegroup(
-    name = "ar",
-    srcs = [
-        "usr/bin/ar",
-    ],
-)
-
-filegroup(
-    name = "ld",
-    srcs = [
-        "usr/bin/ld",
-    ],
-)
-
-filegroup(
-    name = "nm",
-    srcs = [
-        "usr/bin/nm",
-    ],
-)
-
-filegroup(
-    name = "objcopy",
-    srcs = [
-        "usr/bin/objcopy",
-    ],
-)
-
-filegroup(
-    name = "objdump",
-    srcs = [
-        "usr/bin/objdump",
-    ],
-)
-
-filegroup(
-    name = "strip",
-    srcs = [
-        "usr/bin/strip",
-    ],
-)
-
-filegroup(
-    name = "as",
-    srcs = [
-        "usr/bin/as",
-    ],
-)
-
-cc_library(
-    name = "librt",
-    srcs = [
-        "usr/lib/x86_64-linux-gnu/librt.so",
-    ],
-)
-
-cc_library(
-    name = "libdl",
-    srcs = [
-        "usr/lib/x86_64-linux-gnu/libdl.so",
-    ],
-)
-
-cc_library(
-    name = "libm",
-    srcs = [
-        "usr/lib/x86_64-linux-gnu/libm.so",
-    ],
-)
-
-filegroup(
-    name = "compiler_pieces",
-    srcs = glob(
-        include = [
-            "**",
-        ],
-        exclude = [
-            "usr/share/**",
-        ],
-    ) + [
-        "@amd64_debian_sysroot//:sysroot_files",
-    ],
-)
-
-filegroup(
-    name = "compiler_components",
-    srcs = [
-        ":ar",
-        ":as",
-        ":clang",
-        ":ld",
-        ":nm",
-        ":objcopy",
-        ":objdump",
-        ":strip",
-    ],
-)
diff --git a/tools/cpp/clang_6p0/clang_more_libs/libc.so b/tools/cpp/clang_6p0/clang_more_libs/libc.so
deleted file mode 100644
index 5800d08..0000000
--- a/tools/cpp/clang_6p0/clang_more_libs/libc.so
+++ /dev/null
@@ -1,5 +0,0 @@
-/* GNU ld script
-   Use the shared library, but some functions are only in
-   the static library, so try that secondarily.  */
-OUTPUT_FORMAT(elf64-x86-64)
-GROUP ( libc.so.6 libc_nonshared.a  AS_NEEDED ( ld-linux-x86-64.so.2 ) )
diff --git a/tools/cpp/clang_6p0/x86_64-linux-gnu-ar b/tools/cpp/clang_6p0/x86_64-linux-gnu-ar
deleted file mode 100755
index 869dd16..0000000
--- a/tools/cpp/clang_6p0/x86_64-linux-gnu-ar
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib"
-export LD_LIBRARY_PATH
-
-exec -a ar \
-  ${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/bin/ar \
-  "$@"
diff --git a/tools/cpp/clang_6p0/x86_64-linux-gnu-as b/tools/cpp/clang_6p0/x86_64-linux-gnu-as
deleted file mode 100755
index 5f55a68..0000000
--- a/tools/cpp/clang_6p0/x86_64-linux-gnu-as
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib"
-export LD_LIBRARY_PATH
-
-exec -a as \
-  ${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/bin/as \
-  "$@"
diff --git a/tools/cpp/clang_6p0/x86_64-linux-gnu-clang-6.0 b/tools/cpp/clang_6p0/x86_64-linux-gnu-clang-6.0
deleted file mode 100755
index a652027..0000000
--- a/tools/cpp/clang_6p0/x86_64-linux-gnu-clang-6.0
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/x86_64-linux-gnu"
-# TODO(Brian): Figure out why it segfaults with this enabled, and re-enable it.
-#LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib"
-export LD_LIBRARY_PATH
-
-exec \
-  ${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/bin/clang-6.0 \
-  "$@"
diff --git a/tools/cpp/clang_6p0/x86_64-linux-gnu-cpp b/tools/cpp/clang_6p0/x86_64-linux-gnu-cpp
deleted file mode 100755
index d0e1d86..0000000
--- a/tools/cpp/clang_6p0/x86_64-linux-gnu-cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib"
-export LD_LIBRARY_PATH
-
-exec -a cpp \
-  ${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/bin/cpp \
-  "$@"
diff --git a/tools/cpp/clang_6p0/x86_64-linux-gnu-gcc b/tools/cpp/clang_6p0/x86_64-linux-gnu-gcc
deleted file mode 100755
index 0f822e4..0000000
--- a/tools/cpp/clang_6p0/x86_64-linux-gnu-gcc
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib"
-export LD_LIBRARY_PATH
-
-PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/gcc/x86_64-linux-gnu/4.9:$PATH" \
-  exec \
-  ${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/bin/gcc \
-  "$@"
diff --git a/tools/cpp/clang_6p0/x86_64-linux-gnu-gcov b/tools/cpp/clang_6p0/x86_64-linux-gnu-gcov
deleted file mode 100755
index 37195e5..0000000
--- a/tools/cpp/clang_6p0/x86_64-linux-gnu-gcov
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib"
-export LD_LIBRARY_PATH
-
-exec -a gcov \
-  ${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/bin/gcov \
-  "$@"
diff --git a/tools/cpp/clang_6p0/x86_64-linux-gnu-ld b/tools/cpp/clang_6p0/x86_64-linux-gnu-ld
deleted file mode 100755
index 95e302f..0000000
--- a/tools/cpp/clang_6p0/x86_64-linux-gnu-ld
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib"
-export LD_LIBRARY_PATH
-
-exec -a ld \
-  ${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/bin/ld \
-  "$@"
diff --git a/tools/cpp/clang_6p0/x86_64-linux-gnu-nm b/tools/cpp/clang_6p0/x86_64-linux-gnu-nm
deleted file mode 100755
index 4368330..0000000
--- a/tools/cpp/clang_6p0/x86_64-linux-gnu-nm
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib"
-export LD_LIBRARY_PATH
-
-exec -a nm \
-  ${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/bin/nm \
-  "$@"
diff --git a/tools/cpp/clang_6p0/x86_64-linux-gnu-objcopy b/tools/cpp/clang_6p0/x86_64-linux-gnu-objcopy
deleted file mode 100755
index d33835b..0000000
--- a/tools/cpp/clang_6p0/x86_64-linux-gnu-objcopy
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib"
-export LD_LIBRARY_PATH
-
-exec -a objcopy \
-  ${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/bin/objcopy \
-  "$@"
diff --git a/tools/cpp/clang_6p0/x86_64-linux-gnu-objdump b/tools/cpp/clang_6p0/x86_64-linux-gnu-objdump
deleted file mode 100755
index 29e9e37..0000000
--- a/tools/cpp/clang_6p0/x86_64-linux-gnu-objdump
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib"
-export LD_LIBRARY_PATH
-
-exec -a objdump \
-  ${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/bin/objdump \
-  "$@"
diff --git a/tools/cpp/clang_6p0/x86_64-linux-gnu-strip b/tools/cpp/clang_6p0/x86_64-linux-gnu-strip
deleted file mode 100755
index 34b412a..0000000
--- a/tools/cpp/clang_6p0/x86_64-linux-gnu-strip
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/lib"
-export LD_LIBRARY_PATH
-
-exec -a strip \
-  ${BAZEL_OUTPUT_ROOT}external/clang_6p0_repo/usr/bin/strip \
-  "$@"
diff --git a/tools/cpp/linaro_linux_gcc/BUILD b/tools/cpp/linaro_linux_gcc/BUILD
deleted file mode 100644
index 7b7f3e5..0000000
--- a/tools/cpp/linaro_linux_gcc/BUILD
+++ /dev/null
@@ -1,105 +0,0 @@
-package(default_visibility = ["//tools/cpp:__pkg__"])
-
-filegroup(
-    name = "gcc",
-    srcs = [
-        "arm-linux-gnueabihf-gcc",
-        "@linaro_linux_gcc_repo//:gcc",
-    ],
-)
-
-filegroup(
-    name = "ar",
-    srcs = [
-        "arm-linux-gnueabihf-ar",
-        "@linaro_linux_gcc_repo//:ar",
-    ],
-)
-
-filegroup(
-    name = "ld",
-    srcs = [
-        "arm-linux-gnueabihf-ld",
-        "@linaro_linux_gcc_repo//:ld",
-    ],
-)
-
-filegroup(
-    name = "nm",
-    srcs = [
-        "arm-linux-gnueabihf-nm",
-        "@linaro_linux_gcc_repo//:nm",
-    ],
-)
-
-filegroup(
-    name = "objcopy",
-    srcs = [
-        "arm-linux-gnueabihf-objcopy",
-        "@linaro_linux_gcc_repo//:objcopy",
-    ],
-)
-
-filegroup(
-    name = "objdump",
-    srcs = [
-        "arm-linux-gnueabihf-objdump",
-        "@linaro_linux_gcc_repo//:objdump",
-    ],
-)
-
-filegroup(
-    name = "strip",
-    srcs = [
-        "arm-linux-gnueabihf-strip",
-        "@linaro_linux_gcc_repo//:strip",
-    ],
-)
-
-filegroup(
-    name = "as",
-    srcs = [
-        "arm-linux-gnueabihf-as",
-        "@linaro_linux_gcc_repo//:as",
-    ],
-)
-
-filegroup(
-    name = "clang",
-    srcs = [
-        "clang_bin/clang",
-    ],
-)
-
-filegroup(
-    name = "clang-ld",
-    srcs = [
-        "clang_bin/ld",
-        ":ld",
-    ],
-)
-
-filegroup(
-    name = "tool-wrappers",
-    srcs = [
-        "clang_bin/as",
-        ":ar",
-        ":as",
-        ":clang",
-        ":clang-ld",
-        ":gcc",
-        ":ld",
-        ":nm",
-        ":objcopy",
-        ":objdump",
-        ":strip",
-    ],
-)
-
-filegroup(
-    name = "clang-symlinks",
-    srcs = glob([
-        "clang_more_libs/**",
-        "clang_syroot/**",
-    ]),
-)
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ar b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ar
deleted file mode 100755
index 7641296..0000000
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ar
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
-export LD_LIBRARY_PATH
-
-exec -a arm-linux-gnueabihf-ar \
-	${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_repo/bin/arm-linux-gnueabihf-ar \
-	"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-as b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-as
deleted file mode 100755
index 91ccdfb..0000000
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-as
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
-export LD_LIBRARY_PATH
-
-exec -a arm-linux-gnueabihf-as \
-	${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_repo/bin/arm-linux-gnueabihf-as \
-	"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-cpp b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-cpp
deleted file mode 100755
index d9a0513..0000000
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
-export LD_LIBRARY_PATH
-
-exec -a arm-linux-gnueabihf-cpp \
-	${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_repo/bin/arm-linux-gnueabihf-cpp \
-	"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcc b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcc
deleted file mode 100755
index 820f94c..0000000
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcc
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
-export LD_LIBRARY_PATH
-
-PATH="${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_repo/libexec/gcc/arm-linux-gnueabihf/7.4.1:$PATH" \
-	exec \
-	${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_repo/bin/arm-linux-gnueabihf-gcc \
-	"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcov b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcov
deleted file mode 100755
index adda433..0000000
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-gcov
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
-export LD_LIBRARY_PATH
-
-exec -a arm-linux-gnueabihf-gcov \
-	${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_repo/bin/arm-linux-gnueabihf-gcov \
-	"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ld b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ld
deleted file mode 100755
index ef83660..0000000
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-ld
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
-export LD_LIBRARY_PATH
-
-exec -a arm-linux-gnueabihf-ld \
-	${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_repo/bin/arm-linux-gnueabihf-ld \
-	"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-nm b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-nm
deleted file mode 100755
index 9f5eddc..0000000
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-nm
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
-export LD_LIBRARY_PATH
-
-exec -a arm-linux-gnueabihf-nm \
-	${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_repo/bin/arm-linux-gnueabihf-nm \
-	"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objcopy b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objcopy
deleted file mode 100755
index 1d359a0..0000000
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objcopy
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
-export LD_LIBRARY_PATH
-
-exec -a arm-linux-gnueabihf-objcopy \
-	${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_repo/bin/arm-linux-gnueabihf-objcopy \
-	"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objdump b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objdump
deleted file mode 100755
index 14a960b..0000000
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-objdump
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
-export LD_LIBRARY_PATH
-
-exec -a arm-linux-gnueabihf-objdump \
-	${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_repo/bin/arm-linux-gnueabihf-objdump \
-	"$@"
diff --git a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-strip b/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-strip
deleted file mode 100755
index a7389f3..0000000
--- a/tools/cpp/linaro_linux_gcc/arm-linux-gnueabihf-strip
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash --norc
-
-LD_LIBRARY_PATH="${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/usr/lib/x86_64-linux-gnu"
-LD_LIBRARY_PATH+=":${BAZEL_OUTPUT_ROOT}external/linaro_49_deps/lib/x86_64-linux-gnu"
-export LD_LIBRARY_PATH
-
-exec -a arm-linux-gnueabihf-strip \
-	${BAZEL_OUTPUT_ROOT}external/linaro_linux_gcc_repo/bin/arm-linux-gnueabihf-strip \
-	"$@"
diff --git a/tools/cpp/linaro_linux_gcc/clang_bin/as b/tools/cpp/linaro_linux_gcc/clang_bin/as
deleted file mode 120000
index 6129ba8..0000000
--- a/tools/cpp/linaro_linux_gcc/clang_bin/as
+++ /dev/null
@@ -1 +0,0 @@
-../arm-linux-gnueabihf-as
\ No newline at end of file
diff --git a/tools/cpp/linaro_linux_gcc/clang_bin/clang b/tools/cpp/linaro_linux_gcc/clang_bin/clang
deleted file mode 100755
index dcde513..0000000
--- a/tools/cpp/linaro_linux_gcc/clang_bin/clang
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash --norc
-
-exec -a "$0" \
-  "tools/cpp/clang_6p0/x86_64-linux-gnu-clang-6.0" "$@"
diff --git a/tools/cpp/linaro_linux_gcc/clang_bin/ld b/tools/cpp/linaro_linux_gcc/clang_bin/ld
deleted file mode 120000
index d8097cf..0000000
--- a/tools/cpp/linaro_linux_gcc/clang_bin/ld
+++ /dev/null
@@ -1 +0,0 @@
-../arm-linux-gnueabihf-ld
\ No newline at end of file
diff --git a/tools/cpp/linaro_linux_gcc/clang_more_libs/libc.so b/tools/cpp/linaro_linux_gcc/clang_more_libs/libc.so
deleted file mode 100644
index 631fc32..0000000
--- a/tools/cpp/linaro_linux_gcc/clang_more_libs/libc.so
+++ /dev/null
@@ -1,5 +0,0 @@
-/* GNU ld script
-   Use the shared library, but some functions are only in
-   the static library, so try that secondarily.  */
-OUTPUT_FORMAT(elf32-littlearm)
-GROUP ( libc.so.6 libc_nonshared.a  AS_NEEDED ( ld-linux-armhf.so.3 ) )
diff --git a/tools/cpp/toolchain_config.bzl b/tools/cpp/toolchain_config.bzl
index 32b98eb..fb6576c 100644
--- a/tools/cpp/toolchain_config.bzl
+++ b/tools/cpp/toolchain_config.bzl
@@ -11,16 +11,12 @@
 load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
 
 def _impl(ctx):
-    if ctx.attr.cpu == "armhf-debian":
-        toolchain_identifier = "clang_linux_armhf"
-    elif ctx.attr.cpu == "rp2040":
+    if ctx.attr.cpu == "rp2040":
         toolchain_identifier = "rp2040"
     elif ctx.attr.cpu == "cortex-m4f":
         toolchain_identifier = "cortex-m4f"
     elif ctx.attr.cpu == "cortex-m4f-k22":
         toolchain_identifier = "cortex-m4f-k22"
-    elif ctx.attr.cpu == "k8":
-        toolchain_identifier = "k8_linux"
     elif ctx.attr.cpu == "roborio":
         toolchain_identifier = "roborio_linux"
     elif ctx.attr.cpu == "armeabi-v7a":
@@ -30,21 +26,16 @@
 
     if ctx.attr.cpu == "armeabi-v7a":
         host_system_name = "armeabi-v7a"
-    elif ctx.attr.cpu == "armhf-debian":
-        host_system_name = "linux"
     elif (ctx.attr.cpu == "rp2040" or
           ctx.attr.cpu == "cortex-m4f" or
-          ctx.attr.cpu == "cortex-m4f-k22" or
-          ctx.attr.cpu == "k8"):
+          ctx.attr.cpu == "cortex-m4f-k22"):
         host_system_name = "local"
     elif ctx.attr.cpu == "roborio":
         host_system_name = "roborio"
     else:
         fail("Unreachable")
 
-    if ctx.attr.cpu == "armhf-debian":
-        target_system_name = "arm_a15"
-    elif ctx.attr.cpu == "armeabi-v7a":
+    if ctx.attr.cpu == "armeabi-v7a":
         target_system_name = "armeabi-v7a"
     elif ctx.attr.cpu == "rp2040":
         target_system_name = "rp2040"
@@ -52,8 +43,6 @@
         target_system_name = "cortex-m4f"
     elif ctx.attr.cpu == "cortex-m4f-k22":
         target_system_name = "cortex-m4f-k22"
-    elif ctx.attr.cpu == "k8":
-        target_system_name = "k8"
     elif ctx.attr.cpu == "roborio":
         target_system_name = "roborio"
     else:
@@ -61,16 +50,12 @@
 
     if ctx.attr.cpu == "armeabi-v7a":
         target_cpu = "armeabi-v7a"
-    elif ctx.attr.cpu == "armhf-debian":
-        target_cpu = "armhf-debian"
     elif ctx.attr.cpu == "rp2040":
         target_cpu = "rp2040"
     elif ctx.attr.cpu == "cortex-m4f":
         target_cpu = "cortex-m4f"
     elif ctx.attr.cpu == "cortex-m4f-k22":
         target_cpu = "cortex-m4f-k22"
-    elif ctx.attr.cpu == "k8":
-        target_cpu = "k8"
     elif ctx.attr.cpu == "roborio":
         target_cpu = "roborio"
     else:
@@ -84,19 +69,12 @@
         target_libc = "cortex-m4f"
     elif ctx.attr.cpu == "cortex-m4f-k22":
         target_libc = "cortex-m4f-k22"
-    elif ctx.attr.cpu == "armhf-debian":
-        target_libc = "glibc_2.19"
-    elif ctx.attr.cpu == "k8":
-        target_libc = "local"
     elif ctx.attr.cpu == "roborio":
         target_libc = "roborio"
     else:
         fail("Unreachable")
 
-    if (ctx.attr.cpu == "armhf-debian" or
-        ctx.attr.cpu == "k8"):
-        compiler = "clang"
-    elif ctx.attr.cpu == "armeabi-v7a":
+    if ctx.attr.cpu == "armeabi-v7a":
         compiler = "compiler"
     elif (ctx.attr.cpu == "rp2040" or
           ctx.attr.cpu == "cortex-m4f" or
@@ -108,16 +86,12 @@
 
     if ctx.attr.cpu == "armeabi-v7a":
         abi_version = "armeabi-v7a"
-    elif ctx.attr.cpu == "armhf-debian":
-        abi_version = "clang_6.0"
     elif ctx.attr.cpu == "rp2040":
         abi_version = "rp2040"
     elif ctx.attr.cpu == "cortex-m4f":
         abi_version = "cortex-m4f"
     elif ctx.attr.cpu == "cortex-m4f-k22":
         abi_version = "cortex-m4f-k22"
-    elif ctx.attr.cpu == "k8":
-        abi_version = "local"
     elif ctx.attr.cpu == "roborio":
         abi_version = "roborio"
     else:
@@ -131,10 +105,6 @@
         abi_libc_version = "cortex-m4f"
     elif ctx.attr.cpu == "cortex-m4f-k22":
         abi_libc_version = "cortex-m4f-k22"
-    elif ctx.attr.cpu == "armhf-debian":
-        abi_libc_version = "glibc_2.19"
-    elif ctx.attr.cpu == "k8":
-        abi_libc_version = "local"
     elif ctx.attr.cpu == "roborio":
         abi_libc_version = "roborio"
     else:
@@ -202,20 +172,6 @@
                 ),
             ],
         )
-    elif ctx.attr.cpu == "armhf-debian":
-        objcopy_embed_data_action = action_config(
-            action_name = "objcopy_embed_data",
-            enabled = True,
-            tools = [
-                tool(path = "linaro_linux_gcc/arm-linux-gnueabihf-objcopy"),
-            ],
-        )
-    elif ctx.attr.cpu == "k8":
-        objcopy_embed_data_action = action_config(
-            action_name = "objcopy_embed_data",
-            enabled = True,
-            tools = [tool(path = "clang_6p0/x86_64-linux-gnu-objcopy")],
-        )
     elif (ctx.attr.cpu == "rp2040" or
           ctx.attr.cpu == "cortex-m4f" or
           ctx.attr.cpu == "cortex-m4f-k22"):
@@ -229,11 +185,9 @@
 
     if ctx.attr.cpu == "armeabi-v7a":
         action_configs = []
-    elif (ctx.attr.cpu == "armhf-debian" or
-          ctx.attr.cpu == "rp2040" or
+    elif (ctx.attr.cpu == "rp2040" or
           ctx.attr.cpu == "cortex-m4f" or
           ctx.attr.cpu == "cortex-m4f-k22" or
-          ctx.attr.cpu == "k8" or
           ctx.attr.cpu == "roborio"):
         action_configs = [objcopy_embed_data_action]
     else:
@@ -258,100 +212,7 @@
 
     supports_pic_feature = feature(name = "supports_pic", enabled = True)
 
-    if ctx.attr.cpu == "k8":
-        default_compile_flags_feature = feature(
-            name = "default_compile_flags",
-            enabled = True,
-            flag_sets = [
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.assemble,
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.linkstamp_compile,
-                        ACTION_NAMES.c_compile,
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        ACTION_NAMES.cpp_module_compile,
-                        ACTION_NAMES.cpp_module_codegen,
-                        ACTION_NAMES.lto_backend,
-                        ACTION_NAMES.clif_match,
-                    ],
-                    flag_groups = [
-                        flag_group(
-                            flags = [
-                                "--sysroot=external/amd64_debian_sysroot",
-                                "-nostdinc",
-                                "-isystem",
-                                "external/amd64_debian_sysroot/usr/include/c++/7",
-                                "-isystem",
-                                "external/amd64_debian_sysroot/usr/include/x86_64-linux-gnu/c++/7",
-                                "-isystem",
-                                "external/amd64_debian_sysroot/usr/include/c++/8/backward",
-                                "-isystem",
-                                "external/amd64_debian_sysroot/usr/lib/gcc/x86_64-linux-gnu/8/include",
-                                "-isystem",
-                                "external/clang_6p0_repo/usr/lib/llvm-6.0/lib/clang/6.0.0/include",
-                                "-isystem",
-                                "external/amd64_debian_sysroot/usr/include/x86_64-linux-gnu",
-                                "-isystem",
-                                "external/amd64_debian_sysroot/usr/include",
-                                "-D__STDC_FORMAT_MACROS",
-                                "-D__STDC_CONSTANT_MACROS",
-                                "-D__STDC_LIMIT_MACROS",
-                                "-D_FILE_OFFSET_BITS=64",
-                                "-U_FORTIFY_SOURCE",
-                                "-D_FORTIFY_SOURCE=1",
-                                "-fstack-protector",
-                                "-fPIE",
-                                "-fcolor-diagnostics",
-                                "-fmessage-length=80",
-                                "-fmacro-backtrace-limit=0",
-                                "-Wall",
-                                "-Wextra",
-                                "-Wpointer-arith",
-                                "-Wstrict-aliasing",
-                                "-Wcast-qual",
-                                "-Wcast-align",
-                                "-Wwrite-strings",
-                                "-Wtype-limits",
-                                "-Wsign-compare",
-                                "-Wformat=2",
-                                "-Werror",
-                                "-fno-omit-frame-pointer",
-                                "-pipe",
-                                "-ggdb3",
-                            ],
-                        ),
-                    ],
-                ),
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.assemble,
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.linkstamp_compile,
-                        ACTION_NAMES.c_compile,
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        ACTION_NAMES.cpp_module_compile,
-                        ACTION_NAMES.cpp_module_codegen,
-                        ACTION_NAMES.lto_backend,
-                        ACTION_NAMES.clif_match,
-                    ],
-                    flag_groups = [
-                        flag_group(
-                            flags = [
-                                "-O2",
-                                "-DNDEBUG",
-                                "-ffunction-sections",
-                                "-fdata-sections",
-                            ],
-                        ),
-                    ],
-                    with_features = [with_feature_set(features = ["opt"])],
-                ),
-            ],
-        )
-    elif ctx.attr.cpu == "cortex-m4f-k22":
+    if ctx.attr.cpu == "cortex-m4f-k22":
         default_compile_flags_feature = feature(
             name = "default_compile_flags",
             enabled = True,
@@ -607,133 +468,10 @@
                 ),
             ],
         )
-    elif ctx.attr.cpu == "armhf-debian":
-        default_compile_flags_feature = feature(
-            name = "default_compile_flags",
-            enabled = True,
-            flag_sets = [
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.assemble,
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.linkstamp_compile,
-                        ACTION_NAMES.c_compile,
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        ACTION_NAMES.cpp_module_compile,
-                        ACTION_NAMES.cpp_module_codegen,
-                        ACTION_NAMES.lto_backend,
-                        ACTION_NAMES.clif_match,
-                    ],
-                    flag_groups = [
-                        flag_group(
-                            flags = [
-                                "-target",
-                                "armv7a-arm-linux-gnueabif",
-                                "--sysroot=external/armhf_debian_rootfs",
-                                "-mfloat-abi=hard",
-                                "-mfpu=vfpv3-d16",
-                                "-nostdinc",
-                                "-isystem",
-                                "external/linaro_linux_gcc_repo/lib/gcc/arm-linux-gnueabihf/7.4.1/include",
-                                "-isystem",
-                                "external/linaro_linux_gcc_repo/lib/gcc/arm-linux-gnueabihf/7.4.1/include-fixed",
-                                "-isystem",
-                                "external/linaro_linux_gcc_repo/arm-linux-gnueabihf/include/c++/7.4.1/arm-linux-gnueabihf",
-                                "-isystem",
-                                "external/linaro_linux_gcc_repo/arm-linux-gnueabihf/include/c++/7.4.1",
-                                "-isystem",
-                                "external/linaro_linux_gcc_repo/include/c++/7.4.1/arm-linux-gnueabihf",
-                                "-isystem",
-                                "external/linaro_linux_gcc_repo/include/c++/7.4.1",
-                                "-isystem",
-                                "external/armhf_debian_rootfs/usr/include",
-                                "-isystem",
-                                "external/armhf_debian_rootfs/usr/include/arm-linux-gnueabihf",
-                                "-isystem",
-                                "external/org_frc971/third_party",
-                                "-D__STDC_FORMAT_MACROS",
-                                "-D__STDC_CONSTANT_MACROS",
-                                "-D__STDC_LIMIT_MACROS",
-                                "-D_FILE_OFFSET_BITS=64",
-                                "-DAOS_ARCHITECTURE_armhf",
-                                "-U_FORTIFY_SOURCE",
-                                "-fstack-protector",
-                                "-fPIE",
-                                "-fdiagnostics-color=always",
-                                "-Wall",
-                                "-Wextra",
-                                "-Wpointer-arith",
-                                "-Wstrict-aliasing",
-                                "-Wcast-qual",
-                                "-Wcast-align",
-                                "-Wwrite-strings",
-                                "-Wtype-limits",
-                                "-Wsign-compare",
-                                "-Wformat=2",
-                                "-Werror",
-                                "-Wunused-local-typedefs",
-                                "-fno-omit-frame-pointer",
-                                "-pipe",
-                                "-ggdb3",
-                            ],
-                        ),
-                    ],
-                ),
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.assemble,
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.linkstamp_compile,
-                        ACTION_NAMES.c_compile,
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        ACTION_NAMES.cpp_module_compile,
-                        ACTION_NAMES.cpp_module_codegen,
-                        ACTION_NAMES.lto_backend,
-                        ACTION_NAMES.clif_match,
-                    ],
-                    flag_groups = [
-                        flag_group(
-                            flags = [
-                                "-O2",
-                                "-DNDEBUG",
-                                "-D_FORTIFY_SOURCE=1",
-                                "-ffunction-sections",
-                                "-fdata-sections",
-                            ],
-                        ),
-                    ],
-                    with_features = [with_feature_set(features = ["opt"])],
-                ),
-            ],
-        )
     else:
         default_compile_flags_feature = None
 
-    if (ctx.attr.cpu == "armhf-debian" or
-        ctx.attr.cpu == "k8"):
-        dbg_feature = feature(
-            name = "dbg",
-            flag_sets = [
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.c_compile,
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        "c++-header-preprocessing",
-                        ACTION_NAMES.cpp_module_compile,
-                    ],
-                    flag_groups = [
-                        flag_group(flags = ["-DAOS_DEBUG=1"]),
-                        flag_group(flags = ["-fno-omit-frame-pointer"]),
-                    ],
-                ),
-            ],
-            implies = ["all_modes"],
-        )
-    elif ctx.attr.cpu == "roborio":
+    if ctx.attr.cpu == "roborio":
         dbg_feature = feature(
             name = "dbg",
             flag_sets = [
@@ -776,26 +514,7 @@
     else:
         dbg_feature = None
 
-    if (ctx.attr.cpu == "armhf-debian" or
-        ctx.attr.cpu == "k8"):
-        fastbuild_feature = feature(
-            name = "fastbuild",
-            flag_sets = [
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.c_compile,
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        "c++-header-preprocessing",
-                        ACTION_NAMES.cpp_module_compile,
-                    ],
-                    flag_groups = [flag_group(flags = ["-DAOS_DEBUG=0"])],
-                ),
-            ],
-            implies = ["all_modes"],
-        )
-    elif ctx.attr.cpu == "roborio":
+    if ctx.attr.cpu == "roborio":
         fastbuild_feature = feature(
             name = "fastbuild",
             flag_sets = [
@@ -869,25 +588,6 @@
             ],
             implies = ["opt_post"],
         )
-    elif (ctx.attr.cpu == "armhf-debian" or
-          ctx.attr.cpu == "k8"):
-        opt_feature = feature(
-            name = "opt",
-            flag_sets = [
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.c_compile,
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        "c++-header-preprocessing",
-                        ACTION_NAMES.cpp_module_compile,
-                    ],
-                    flag_groups = [flag_group(flags = ["-DAOS_DEBUG=0"])],
-                ),
-            ],
-            implies = ["all_modes"],
-        )
     elif (ctx.attr.cpu == "rp2040" or
           ctx.attr.cpu == "cortex-m4f" or
           ctx.attr.cpu == "cortex-m4f-k22"):
@@ -1119,88 +819,6 @@
                 # TODO(austin): I'd love to turn --gc-sections on, but that breaks things.
             ],
         )
-    elif ctx.attr.cpu == "k8":
-        default_link_flags_feature = feature(
-            name = "default_link_flags",
-            enabled = True,
-            flag_sets = [
-                flag_set(
-                    actions = all_link_actions,
-                    flag_groups = [
-                        flag_group(
-                            flags = [
-                                "-nodefaultlibs",
-                                "--sysroot=external/amd64_debian_sysroot",
-                                "-lstdc++",
-                                "-lc",
-                                "-lgcc",
-                                "-lgcc_s",
-                                "-Bexternal/clang_6p0_repo/usr/bin/",
-                                "-Ltools/cpp/clang_6p0/clang_more_libs",
-                                "-Lexternal/amd64_debian_sysroot/usr/lib/gcc/x86_64-linux-gnu/7/",
-                                "-Lexternal/amd64_debian_sysroot/usr/lib/x86_64-linux-gnu/",
-                                "-Lexternal/amd64_debian_sysroot/usr/lib/",
-                                "-Lexternal/amd64_debian_sysroot/lib/x86_64-linux-gnu/",
-                                "-Lexternal/amd64_debian_sysroot/lib/",
-                                "-no-canonical-prefixes",
-                                "-fuse-ld=gold",
-                                "-Wl,-z,relro,-z,now",
-                                "-lm",
-                                "-Wl,--build-id=md5",
-                                "-Wl,--hash-style=gnu",
-                                "-Wl,--warn-execstack",
-                                "-Wl,--detect-odr-violations",
-                            ],
-                        ),
-                    ],
-                ),
-                flag_set(
-                    actions = all_link_actions,
-                    flag_groups = [flag_group(flags = ["-Wl,--gc-sections"])],
-                    with_features = [with_feature_set(features = ["opt"])],
-                ),
-            ],
-        )
-    elif ctx.attr.cpu == "armhf-debian":
-        default_link_flags_feature = feature(
-            name = "default_link_flags",
-            enabled = True,
-            flag_sets = [
-                flag_set(
-                    actions = all_link_actions,
-                    flag_groups = [
-                        flag_group(
-                            flags = [
-                                "-target",
-                                "armv7a-arm-linux-gnueabif",
-                                "--sysroot=external/armhf_debian_rootfs",
-                                "-lstdc++",
-                                "-Ltools/cpp/linaro_linux_gcc/clang_more_libs",
-                                "-Lexternal/armhf_debian_rootfs/usr/lib/gcc/arm-linux-gnueabihf/8",
-                                "-Lexternal/armhf_debian_rootfs/lib/arm-linux-gnueabihf",
-                                "-Lexternal/armhf_debian_rootfs/usr/lib/arm-linux-gnueabihf",
-                                "-Lexternal/armhf_debian_rootfs/lib",
-                                "-Lexternal/armhf_debian_rootfs/usr/lib",
-                                "-Lexternal/linaro_linux_gcc_repo/lib/gcc/arm-linux-gnueabihf/7.4.1",
-                                "-Bexternal/linaro_linux_gcc_repo/lib/gcc/arm-linux-gnueabihf/7.4.1",
-                                "-Bexternal/linaro_linux_gcc_repo/arm-linux-gnueabihf/bin",
-                                "-Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3",
-                                "-no-canonical-prefixes",
-                                "-Wl,-z,relro,-z,now",
-                                "-lm",
-                                "-Wl,--build-id=md5",
-                                "-Wl,--hash-style=gnu",
-                            ],
-                        ),
-                    ],
-                ),
-                flag_set(
-                    actions = all_link_actions,
-                    flag_groups = [flag_group(flags = ["-Wl,--gc-sections"])],
-                    with_features = [with_feature_set(features = ["opt"])],
-                ),
-            ],
-        )
     else:
         default_link_flags_feature = None
 
@@ -1274,71 +892,15 @@
                 ),
             ],
         )
-    elif ctx.attr.cpu == "armhf-debian":
-        all_modes_feature = feature(
-            name = "all_modes",
-            flag_sets = [
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.assemble,
-                        ACTION_NAMES.c_compile,
-                    ],
-                    flag_groups = [flag_group(flags = ["-std=gnu99"])],
-                ),
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        "c++-header-preprocessing",
-                        ACTION_NAMES.cpp_module_compile,
-                    ],
-                    flag_groups = [flag_group(flags = ["-std=gnu++1z"])],
-                ),
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.assemble,
-                        "c++-link",
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        "c++-header-preprocessing",
-                        ACTION_NAMES.cpp_module_compile,
-                        ACTION_NAMES.c_compile,
-                    ],
-                    flag_groups = [flag_group(flags = ["-pthread"])],
-                ),
-            ],
-        )
-    elif ctx.attr.cpu == "k8":
-        all_modes_feature = feature(
-            name = "all_modes",
-            flag_sets = [
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.assemble,
-                        ACTION_NAMES.c_compile,
-                    ],
-                    flag_groups = [flag_group(flags = ["-std=gnu99"])],
-                ),
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        "c++-header-preprocessing",
-                        ACTION_NAMES.cpp_module_compile,
-                    ],
-                    flag_groups = [flag_group(flags = ["-std=gnu++1z"])],
-                ),
-            ],
-        )
     else:
         all_modes_feature = None
 
     supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True)
 
-    if ctx.attr.cpu == "k8":
+    if (ctx.attr.cpu == "rp2040" or
+        ctx.attr.cpu == "cortex-m4f" or
+        ctx.attr.cpu == "cortex-m4f-k22" or
+        ctx.attr.cpu == "roborio"):
         unfiltered_compile_flags_feature = feature(
             name = "unfiltered_compile_flags",
             enabled = True,
@@ -1364,79 +926,6 @@
                                 "-D__DATE__=\"redacted\"",
                                 "-D__TIMESTAMP__=\"redacted\"",
                                 "-D__TIME__=\"redacted\"",
-                                "-Wno-varargs",
-                                "-Wno-null-pointer-arithmetic",
-                                "-Wno-mismatched-new-delete",
-                            ],
-                        ),
-                    ],
-                ),
-            ],
-        )
-    elif (ctx.attr.cpu == "rp2040" or
-          ctx.attr.cpu == "cortex-m4f" or
-          ctx.attr.cpu == "cortex-m4f-k22" or
-          ctx.attr.cpu == "roborio"):
-        unfiltered_compile_flags_feature = feature(
-            name = "unfiltered_compile_flags",
-            enabled = True,
-            flag_sets = [
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.assemble,
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.linkstamp_compile,
-                        ACTION_NAMES.c_compile,
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        ACTION_NAMES.cpp_module_compile,
-                        ACTION_NAMES.cpp_module_codegen,
-                        ACTION_NAMES.lto_backend,
-                        ACTION_NAMES.clif_match,
-                    ],
-                    flag_groups = [
-                        flag_group(
-                            flags = [
-                                "-no-canonical-prefixes",
-                                "-Wno-builtin-macro-redefined",
-                                "-D__DATE__=\"redacted\"",
-                                "-D__TIMESTAMP__=\"redacted\"",
-                                "-D__TIME__=\"redacted\"",
-                            ],
-                        ),
-                    ],
-                ),
-            ],
-        )
-    elif ctx.attr.cpu == "armhf-debian":
-        unfiltered_compile_flags_feature = feature(
-            name = "unfiltered_compile_flags",
-            enabled = True,
-            flag_sets = [
-                flag_set(
-                    actions = [
-                        ACTION_NAMES.assemble,
-                        ACTION_NAMES.preprocess_assemble,
-                        ACTION_NAMES.linkstamp_compile,
-                        ACTION_NAMES.c_compile,
-                        ACTION_NAMES.cpp_compile,
-                        ACTION_NAMES.cpp_header_parsing,
-                        ACTION_NAMES.cpp_module_compile,
-                        ACTION_NAMES.cpp_module_codegen,
-                        ACTION_NAMES.lto_backend,
-                        ACTION_NAMES.clif_match,
-                    ],
-                    flag_groups = [
-                        flag_group(
-                            flags = [
-                                "-no-canonical-prefixes",
-                                "-Wno-builtin-macro-redefined",
-                                "-Wno-mismatched-new-delete",
-                                "-Wno-null-pointer-arithmetic",
-                                "-Wno-varargs",
-                                "-D__DATE__=\"redacted\"",
-                                "-D__TIMESTAMP__=\"redacted\"",
-                                "-D__TIME__=\"redacted\"",
                             ],
                         ),
                     ],
@@ -1653,22 +1142,6 @@
             sysroot_feature,
             unfiltered_compile_flags_feature,
         ]
-    elif (ctx.attr.cpu == "armhf-debian" or
-          ctx.attr.cpu == "k8"):
-        features = [
-            default_compile_flags_feature,
-            default_link_flags_feature,
-            opt_feature,
-            dbg_feature,
-            fastbuild_feature,
-            all_modes_feature,
-            pie_for_linking_feature,
-            supports_dynamic_linker_feature,
-            supports_pic_feature,
-            user_compile_flags_feature,
-            sysroot_feature,
-            unfiltered_compile_flags_feature,
-        ]
     elif ctx.attr.cpu == "roborio":
         features = [
             default_link_flags_feature,
@@ -1703,22 +1176,6 @@
             "%package(@arm_frc_linux_gnueabi_repo//arm-frc2020-linux-gnueabi/usr/include/c++/7.3.0/arm-frc2020-linux-gnueabi)%",
             "%package(@arm_frc_linux_gnueabi_repo//arm-frc2020-linux-gnueabi/usr/include/c++/7.3.0/backward)%",
         ]
-    elif ctx.attr.cpu == "k8":
-        cxx_builtin_include_directories = [
-            "%package(@clang_6p0_repo//usr)%/lib/llvm-6.0/lib/clang/6.0.0/include",
-            "%package(@amd64_debian_sysroot//usr)%/include",
-            "%package(@amd64_debian_sysroot//usr)%/lib/gcc/x86_64-linux-gnu/7/include",
-            "%package(@amd64_debian_sysroot//usr)%/lib/gcc/x86_64-linux-gnu/7/include-fixed",
-        ]
-    elif ctx.attr.cpu == "armhf-debian":
-        cxx_builtin_include_directories = [
-            "%package(@linaro_linux_gcc_repo//include)%",
-            "%package(@armhf_debian_rootfs//usr/include)%",
-            "%package(@linaro_linux_gcc_repo//include)%/c++/7.4.1",
-            "%package(@linaro_linux_gcc_repo//lib/gcc/arm-linux-gnueabihf/7.4.1/include)%",
-            "%package(@linaro_linux_gcc_repo//lib/gcc/arm-linux-gnueabihf/7.4.1/include-fixed)%",
-            "%package(@linaro_linux_gcc_repo//arm-linux-gnueabihf/include)%/c++/7.4.1",
-        ]
     elif (ctx.attr.cpu == "rp2040" or
           ctx.attr.cpu == "cortex-m4f" or
           ctx.attr.cpu == "cortex-m4f-k22"):
@@ -1783,53 +1240,6 @@
                 path = "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-strip",
             ),
         ]
-    elif ctx.attr.cpu == "k8":
-        tool_paths = [
-            tool_path(
-                name = "ar",
-                path = "clang_6p0/x86_64-linux-gnu-ar",
-            ),
-            tool_path(
-                name = "compat-ld",
-                path = "clang_6p0/x86_64-linux-gnu-ld",
-            ),
-            tool_path(
-                name = "cpp",
-                path = "clang_6p0/x86_64-linux-gnu-cpp",
-            ),
-            tool_path(
-                name = "dwp",
-                path = "clang_6p0/x86_64-linux-gnu-dwp",
-            ),
-            tool_path(
-                name = "gcc",
-                path = "clang_6p0/x86_64-linux-gnu-clang-6.0",
-            ),
-            tool_path(
-                name = "gcov",
-                path = "clang_6p0/x86_64-linux-gnu-gcov",
-            ),
-            tool_path(
-                name = "ld",
-                path = "clang_6p0/x86_64-linux-gnu-ld",
-            ),
-            tool_path(
-                name = "nm",
-                path = "clang_6p0/x86_64-linux-gnu-nm",
-            ),
-            tool_path(
-                name = "objcopy",
-                path = "clang_6p0/x86_64-linux-gnu-objcopy",
-            ),
-            tool_path(
-                name = "objdump",
-                path = "clang_6p0/x86_64-linux-gnu-objdump",
-            ),
-            tool_path(
-                name = "strip",
-                path = "clang_6p0/x86_64-linux-gnu-strip",
-            ),
-        ]
     elif (ctx.attr.cpu == "rp2040" or
           ctx.attr.cpu == "cortex-m4f" or
           ctx.attr.cpu == "cortex-m4f-k22"):
@@ -1879,53 +1289,6 @@
                 path = "gcc_arm_none_eabi/arm-none-eabi-strip",
             ),
         ]
-    elif ctx.attr.cpu == "armhf-debian":
-        tool_paths = [
-            tool_path(
-                name = "ar",
-                path = "linaro_linux_gcc/arm-linux-gnueabihf-ar",
-            ),
-            tool_path(
-                name = "compat-ld",
-                path = "linaro_linux_gcc/arm-linux-gnueabihf-ld",
-            ),
-            tool_path(
-                name = "cpp",
-                path = "linaro_linux_gcc/clang_bin/clang",
-            ),
-            tool_path(
-                name = "dwp",
-                path = "linaro_linux_gcc/arm-linux-gnueabihf-dwp",
-            ),
-            tool_path(
-                name = "gcc",
-                path = "linaro_linux_gcc/clang_bin/clang",
-            ),
-            tool_path(
-                name = "gcov",
-                path = "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-gcov-4.9",
-            ),
-            tool_path(
-                name = "ld",
-                path = "linaro_linux_gcc/arm-linux-gnueabihf-ld",
-            ),
-            tool_path(
-                name = "nm",
-                path = "linaro_linux_gcc/arm-linux-gnueabihf-nm",
-            ),
-            tool_path(
-                name = "objcopy",
-                path = "linaro_linux_gcc/arm-linux-gnueabihf-objcopy",
-            ),
-            tool_path(
-                name = "objdump",
-                path = "linaro_linux_gcc/arm-linux-gnueabihf-objdump",
-            ),
-            tool_path(
-                name = "strip",
-                path = "linaro_linux_gcc/arm-linux-gnueabihf-strip",
-            ),
-        ]
     elif ctx.attr.cpu == "armeabi-v7a":
         tool_paths = [
             tool_path(name = "ar", path = "/bin/false"),
@@ -1973,7 +1336,7 @@
 cc_toolchain_config = rule(
     implementation = _impl,
     attrs = {
-        "cpu": attr.string(mandatory = True, values = ["armeabi-v7a", "armhf-debian", "cortex-m4f", "cortex-m4f-k22", "k8", "roborio", "rp2040"]),
+        "cpu": attr.string(mandatory = True, values = ["armeabi-v7a", "cortex-m4f", "cortex-m4f-k22", "roborio", "rp2040"]),
     },
     provides = [CcToolchainConfigInfo],
     executable = True,
diff --git a/tools/platforms/BUILD b/tools/platforms/BUILD
index 4df177c..bb53ee1 100644
--- a/tools/platforms/BUILD
+++ b/tools/platforms/BUILD
@@ -10,7 +10,7 @@
 )
 
 platform(
-    name = "linux_armhf",
+    name = "linux_armv7",
     constraint_values = [
         "@platforms//os:linux",
         "@platforms//cpu:armv7",
diff --git a/tools/python/runtime_binary.sh b/tools/python/runtime_binary.sh
index 9cd1519..0bc832c 100755
--- a/tools/python/runtime_binary.sh
+++ b/tools/python/runtime_binary.sh
@@ -23,7 +23,7 @@
 for path in ${PYTHONPATH//:/ }; do
   if [[ "$path" == *.runfiles/python_repo ]]; then
     BASE_PATH="$path"
-    export LD_LIBRARY_PATH="$path"/lib/x86_64-linux-gnu:"$path"/usr/lib:"$path"/usr/lib/x86_64-linux-gnu
+    export LD_LIBRARY_PATH="$path"/lib/x86_64-linux-gnu:"$path"/usr/lib:"$path"/usr/lib/x86_64-linux-gnu:"$path"/../matplotlib_repo/usr/lib
     break
   fi
 done
@@ -34,7 +34,7 @@
   exit 1
 fi
 
-export LD_LIBRARY_PATH="${BASE_PATH}/usr/lib/lapack:${BASE_PATH}/usr/lib/libblas:${BASE_PATH}/usr/lib/x86_64-linux-gnu"
+export LD_LIBRARY_PATH="${BASE_PATH}/usr/lib/lapack:${BASE_PATH}/usr/lib/libblas:${BASE_PATH}/usr/lib/x86_64-linux-gnu:${BASE_PATH}/../matplotlib_repo/rpathed3/usr/lib"
 
 # Prevent Python from importing the host's installed packages.
 exec "$BASE_PATH"/usr/bin/python3 -sS "$@"