https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98860
--- Comment #56 from jyong at gcc dot gnu.org --- OK, I've tested the patch from attachment 50461, seems to work fine: gcc uses dwarf 4 by default if it does find a broken linker, but allows the user to specify -gdwarf-5 if they want, resulting in a broken executable. If the linker was found to be working at build time, dwarf-5 would be default. I prefer the non-noisy patch because gcc doesn't actually detect the linker bug at runtime, just silently doing what it thinks is best, which may not be accurate if the user upgrades or downgrades binutils without a rebuild.