diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-10-16 05:59:51 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-10-24 09:03:36 -0700 |
commit | 1aeb7d7d67d167297ca2f4a97ef20f68e7546b4c (patch) | |
tree | 4f74334ca22079bdab72a7d5ec1250a31c35a65d /gcc/gcc.c | |
parent | 0df73beea03f9dc124dc6e98ec4bdeacca7a2eea (diff) | |
download | gcc-1aeb7d7d67d167297ca2f4a97ef20f68e7546b4c.zip gcc-1aeb7d7d67d167297ca2f4a97ef20f68e7546b4c.tar.gz gcc-1aeb7d7d67d167297ca2f4a97ef20f68e7546b4c.tar.bz2 |
Update check for working assembler --gdwarf-4 option
Rename HAVE_AS_WORKING_DWARF_4_FLAG to HAVE_AS_WORKING_DWARF_N_FLAG
Don't set HAVE_AS_WORKING_DWARF_N_FLAG if --gdwarf-5/--gdwarf-4 generate
an extra assembly input file in debug info from compiler generated
.debug_line or fail with the APP marker:
https://sourceware.org/bugzilla/show_bug.cgi?id=25878
https://sourceware.org/bugzilla/show_bug.cgi?id=26740
https://sourceware.org/bugzilla/show_bug.cgi?id=26778
Also replace success with dwarf4_success in the 32-bit --gdwarf-4 check.
PR bootstrap/97451
* configure.ac (HAVE_AS_WORKING_DWARF_4_FLAG): Renamed to ...
(HAVE_AS_WORKING_DWARF_N_FLAG): This. Don't define if there is
an extra assembly input file in debug info. Replace success
with dwarf4_success in the 32-bit --gdwarf-4 check.
* dwarf2out.c (asm_outputs_debug_line_str): Check
HAVE_AS_WORKING_DWARF_N_FLAG instead of
HAVE_AS_WORKING_DWARF_4_FLAG.
* gcc.c (ASM_DEBUG_SPEC): Likewise.
(ASM_DEBUG_OPTION_SPEC): Likewise.
* config.in: Regenerated.
* configure: Likewise.
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -880,7 +880,7 @@ proper position among the other output files. */ /* Define ASM_DEBUG_SPEC to be a spec suitable for translating '-g' to the assembler, when compiling assembly sources only. */ #ifndef ASM_DEBUG_SPEC -# if defined(HAVE_AS_GDWARF_5_DEBUG_FLAG) && defined(HAVE_AS_WORKING_DWARF_4_FLAG) +# if defined(HAVE_AS_GDWARF_5_DEBUG_FLAG) && defined(HAVE_AS_WORKING_DWARF_N_FLAG) /* If --gdwarf-N is supported and as can handle even compiler generated .debug_line with it, supply --gdwarf-N in ASM_DEBUG_OPTION_SPEC rather than in ASM_DEBUG_SPEC, so that it applies to both .s and .c etc. @@ -921,7 +921,7 @@ proper position among the other output files. */ /* Define ASM_DEBUG_OPTION_SPEC to be a spec suitable for translating '-g' to the assembler when compiling all sources. */ #ifndef ASM_DEBUG_OPTION_SPEC -# if defined(HAVE_AS_GDWARF_5_DEBUG_FLAG) && defined(HAVE_AS_WORKING_DWARF_4_FLAG) +# if defined(HAVE_AS_GDWARF_5_DEBUG_FLAG) && defined(HAVE_AS_WORKING_DWARF_N_FLAG) # define ASM_DEBUG_OPTION_DWARF_OPT \ "%{%:dwarf-version-gt(4):--gdwarf-5 ;" \ "%:dwarf-version-gt(3):--gdwarf-4 ;" \ |