public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Eric Botcazou <ebotcazou@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-8711] Fix build failure on Windows with older binutils Date: Fri, 9 Jul 2021 10:14:55 +0000 (GMT) [thread overview] Message-ID: <20210709101455.372293854830@sourceware.org> (raw) https://gcc.gnu.org/g:d9d954ebd507572a460f93f404bba71e271e2dda commit r11-8711-gd9d954ebd507572a460f93f404bba71e271e2dda Author: Eric Botcazou <ebotcazou@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. Diff: --- gcc/gcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/gcc.c b/gcc/gcc.c index 7837553958b..7c75d1314fa 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -910,7 +910,7 @@ proper position among the other output files. */ than in ASM_DEBUG_SPEC, so that it applies to both .s and .c etc. compilations. */ # define ASM_DEBUG_DWARF_OPTION "" -# elif defined(HAVE_AS_GDWARF_5_DEBUG_FLAG) +# elif defined(HAVE_AS_GDWARF_5_DEBUG_FLAG) && !defined(HAVE_LD_BROKEN_PE_DWARF5) # define ASM_DEBUG_DWARF_OPTION "%{%:dwarf-version-gt(4):--gdwarf-5;" \ "%:dwarf-version-gt(3):--gdwarf-4;" \ "%:dwarf-version-gt(2):--gdwarf-3;" \
reply other threads:[~2021-07-09 10:14 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210709101455.372293854830@sourceware.org \ --to=ebotcazou@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).