From 1aeb7d7d67d167297ca2f4a97ef20f68e7546b4c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 16 Oct 2020 05:59:51 -0700 Subject: 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. --- gcc/gcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/gcc.c') diff --git a/gcc/gcc.c b/gcc/gcc.c index 337c274..cdf4d4f 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -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 ;" \ -- cgit v1.1