diff --git a/scripts/ext-toolchain.sh b/scripts/ext-toolchain.sh
index 3ebaa214879e248facf5b69ac75497b51580a5f5..a552fbe3fcce3dfff791cc1ce65fdd8e70ace1aa 100755
--- a/scripts/ext-toolchain.sh
+++ b/scripts/ext-toolchain.sh
@@ -91,7 +91,7 @@ test_uclibc() {
 	local sysroot="$("$CC" $CFLAGS -print-sysroot 2>/dev/null)"
 	if [ -d "${sysroot:-$TOOLCHAIN}" ]; then
 		local lib
-		for lib in "${sysroot:-$TOOLCHAIN}"/{lib,usr/lib,usr/local/lib}/ld-uClibc*.so*; do
+		for lib in "${sysroot:-$TOOLCHAIN}"/{lib,usr/lib,usr/local/lib}/ld*-uClibc*.so*; do
 			if [ -f "$lib" ] && [ ! -h "$lib" ]; then
 				return 0
 			fi