https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101377
--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Eric Botcazou <ebotca...@gcc.gnu.org>: https://gcc.gnu.org/g:d9d954ebd507572a460f93f404bba71e271e2dda commit r11-8711-gd9d954ebd507572a460f93f404bba71e271e2dda Author: Eric Botcazou <ebotca...@adacore.com> Date: Fri Jul 9 12:08:52 2021 +0200 Fix build failure on Windows with older binutils This is the build failure on Windows with binutils for which GNU as accepts the --gdwarf-5 switch but GNU ld generates broken binaries with DWARF 5. We already have the HAVE_LD_BROKEN_PE_DWARF5 kludge to disable DWARF 5 in this case but it only tames the DWARF version in the compiler, so the driver still passes --gdwarf-5 when invoked on an assembly file with -g. gcc/ PR target/101377 * gcc.c (ASM_DEBUG_DWARF_OPTION): Set again to --gdwarf2 in the case where HAVE_AS_WORKING_DWARF_N_FLAG is not defined and HAVE_LD_BROKEN_PE_DWARF5 is defined.