https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126452
--- Comment #1 from Sam James <sjames at gcc dot gnu.org> --- I feel like it should probably be testing for no output anyway. In any case, if going to keep it as it is, please add LC_ALL=C before $LD too.
