[PATCH] selftests/nolibc: don't download GCC toolchain for clang-only architectures

From: Thomas Weißschuh

Date: Mon Nov 02 2026 - 00:56:11 EST


If no GCC toolchain exists the download will fail.

Fixes: 4b4f56583850 ("selftests/nolibc: prepare for clang-only architectures")
Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
---
tools/testing/selftests/nolibc/run-tests.sh | 3 +++
1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/testing/selftests/nolibc/run-tests.sh
index 2844fed26df1..cc91b8656b20 100755
--- a/tools/testing/selftests/nolibc/run-tests.sh
+++ b/tools/testing/selftests/nolibc/run-tests.sh
@@ -144,6 +144,9 @@ need_gcc() {
download_crosstool() {
arch="$(crosstool_arch "$1")"
abi="$(crosstool_abi "$1")"
+ gcc="$(need_gcc "$1")"
+
+ [ -z "$gcc" ] && return

archive_name="${hostarch}-gcc-${crosstool_version}-nolibc-${arch}-${abi}.tar.gz"
url="https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/${hostarch}/${crosstool_version}/${archive_name}";

---
base-commit: 228a318052869ab08f01f53b5cedfae0e930f6dd
change-id: 20261102-nolibc-gcc-download-7c72df57961a

Best regards,
--
Thomas Weißschuh <linux@xxxxxxxxxxxxxx>