]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix build failure on Windows with older binutils
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 9 Jul 2021 10:08:52 +0000 (12:08 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 9 Jul 2021 10:14:45 +0000 (12:14 +0200)
commitd9d954ebd507572a460f93f404bba71e271e2dda
tree2a09afb72e71ee5c88093982b691b508ae2b6a62
parent1e92a6e1631b821b955af235c0724837bc5dc0f9
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.
gcc/gcc.c