OK I have polished off my code in light of previous discussion and will submit it in follow-up emails.
As mentioned before, this patch series is on top of the non-behavior-changing cleanup I previously submitted in https://gcc.gnu.org/pipermail/gcc-patches/2021-August/576725.html The first patch implements my original approach of always searching for `$machine-prog`. The next two patches refine that approach by only searching for `$machine-prog` in directories that are not already machine-disambiguated, as discussed. I wanted to include this fuller history to allow both approaches to be compared, but if desired I am happy to submit a v2 patch set with a more condensed history for whichever option is chosen. Thanks, John