]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix bootstap-errors due to enabling -gvariable-location-views
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sat, 24 Aug 2024 06:37:53 +0000 (08:37 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 26 Aug 2024 13:41:06 +0000 (15:41 +0200)
This recent change triggered various bootstap-errors, mostly on
x86 targets because line info advance address entries were output
in the wrong section table.
The switch to the wrong line table happened in dwarfout_set_ignored_loc.
It must use the same section as the earlier called
dwarf2out_switch_text_section.

But also ft32-elf was affected, because the assembler choked on
something simple as ".2byte .LM2-.LM1", but fortunately it is
able to use native location views, the configure test was just
not executed because the ft32 "nop" instruction was missing.

gcc/ChangeLog:

PR debug/116470
* configure.ac: Add the "nop" instruction for cpu type ft32.
* configure: Regenerate.
* dwarf2out.cc (dwarf2out_set_ignored_loc): Use the correct
line info section.

gcc/configure
gcc/configure.ac
gcc/dwarf2out.cc

index 557ea5fa3ac94dc6d13961216b3f89946f86c9e5..3d301b6ecd3df1352322260de69475012f04604b 100755 (executable)
@@ -31398,7 +31398,7 @@ esac
 case "$cpu_type" in
   aarch64 | alpha | arc | arm | avr | bfin | cris | csky | i386 | loongarch | m32c \
   | m68k | microblaze | mips | nds32 | nios2 | pa | riscv | rs6000 | score | sparc \
-  | visium | xstormy16 | xtensa)
+  | visium | xstormy16 | xtensa | ft32)
     insn="nop"
     ;;
   ia64 | s390)
index eaa01d0d7e568739fc49f85bf7d68d8ba5a3b14f..8a2d2b0438e714f0fdb28457609607804b8d54e7 100644 (file)
@@ -5610,7 +5610,7 @@ esac
 case "$cpu_type" in
   aarch64 | alpha | arc | arm | avr | bfin | cris | csky | i386 | loongarch | m32c \
   | m68k | microblaze | mips | nds32 | nios2 | pa | riscv | rs6000 | score | sparc \
-  | visium | xstormy16 | xtensa)
+  | visium | xstormy16 | xtensa | ft32)
     insn="nop"
     ;;
   ia64 | s390)
index 633900b035fe96ebac4c214289edf9823953b83a..3f040da33a63b4043215df60f9882f1e9cd2a74d 100644 (file)
@@ -28939,7 +28939,7 @@ dwarf2out_set_ignored_loc (unsigned int line, unsigned int column,
   dw_fde_ref fde = cfun->fde;
 
   fde->ignored_debug = false;
-  set_cur_line_info_table (function_section (fde->decl));
+  set_cur_line_info_table (current_function_section ());
 
   dwarf2out_source_line (line, column, filename, 0, true);
 }