Make _CMAKE_TOOLCHAIN_PREFIX heuristic more robust
Since !4547 (merged) our heuristic to detect _CMAKE_TOOLCHAIN_PREFIX
from the compiler name now applies even when not cross-compiling. The goal was to automatically use matching binutils in the case that the compiler has a prefix on its name. As reported in #21103 (closed), this heuristic can also trigger on unrelated prefixes like mywrapper-gcc
. This caused binutils detection to break. We fixed that in !5137 (merged) by adding a fallback for plain binutils names when not cross-compiling. However, we should still investigate making the heuristic more robust in the first place. We should not treat mywrapper-
as a binutils prefix.