In GCC 8.2, the compiler fails to bootstrap due to many files differing between stage2 and stage3. After removing the "STAGE2_CFLAGS += -gtoggle" line from src/config/bootstrap-debug.mk, the compiler successfully bootstraps. This is with the Debian gcc-8 packaging.
Here is the full build log: https://buildd.debian.org/status/fetch.php?pkg=gcc-8&arch=ia64&ver=8.2.0-6&stamp=1536516302&raw=0
Does it work with GCC 7.3.0?
Yes. From the Debian build log: https://buildd.debian.org/status/fetch.php?pkg=gcc-7&arch=ia64&ver=7.3.0-29&stamp=1536161281&raw=0
I cannot reproduce that with the current 8.2 branch.
According to the build logs [1], one of the major differences when the regression was introduced, was the use of a newer binutils version: With binutils_2.30, gcc-8.1.0 builds fine: > https://buildd.debian.org/status/fetch.php?pkg=gcc-8&arch=ia64&ver=8.1.0-9&stamp=1530078388&raw=0 With binutils_2.30.90.20180710, the build fails: > https://buildd.debian.org/status/fetch.php?pkg=gcc-8&arch=ia64&ver=8.1.0-10&stamp=1531402269&raw=0 The changelog for the Debian gcc-8 package can be found here: > http://metadata.ftp-master.debian.org/changelogs/main/g/gcc-8/gcc-8_8.2.0-7_changelog The changes for 8.1.0-10 were: * Update to SVN 20180712 (r262577) from the gcc-8-branch. - Fix PR libstdc++/86272, PR libstdc++/86127, PR target/85904, PR libstdc++/85098, PR libstdc++/85671, PR libstdc++/83982, PR libstdc++/86292, PR libstdc++/86138, PR libstdc++/84087, PR libstdc++/86398, PR hsa/86371, PR tree-optimization/86492, PR c++/86400, PR target/86285 (PPC), PR debug/86064, PR target/86222 (PPC), PR rtl-optimization/85645, PR rtl-optimization/85645, PR target/86314 (x86), PR sanitizer/86406, PR c++/86398, PR c++/86378, PR c++/86320, PR c++/80290, PR fortran/82969, PR fortran/86242, PR fortran/82865. * Enable decimal float support on kfreebsd-amd64. Closes: #897416. @Jason: Can you try building 8.1.0-9 from snapshot.debian.org with binutils_2.30.90.20180710?
Created attachment 46245 [details] Proposed patch Currently performing a test build with this patch, but applying `s/^.LBI[0-9]*:$/[&]/g` to the stage2 (the one with debug info enabled) assembly for one of the differing files fixed the differences to the stage3 file, so I'm confident this will fix it (assuming my change actually compiles).
CCing ia64 port maintainer
Oh, and the reason it didn't show up with an older binutils is because it didn't support dwarf2 debug_view: > checking assembler for dwarf2 debug_view support... no
(In reply to James Clarke from comment #6) > Created attachment 46245 [details] > Proposed patch > > Currently performing a test build with this patch, but applying > `s/^.LBI[0-9]*:$/[&]/g` to the stage2 (the one with debug info enabled) > assembly for one of the differing files fixed the differences to the stage3 > file, so I'm confident this will fix it (assuming my change actually > compiles). Patch confirmed to work locally (also, stage2 and stage3 should be swapped in the above comment, since stage2 is the one that *disables* debug info). I will send it to the mailing list shortly.
Debian includes the patch now and consequently gcc-8 builds fine again: > https://buildd.debian.org/status/fetch.php?pkg=gcc-8&arch=ia64&ver=8.3.0-7&stamp=1556533635&raw=0
Author: law Date: Tue May 21 15:42:00 2019 New Revision: 271472 URL: https://gcc.gnu.org/viewcvs?rev=271472&root=gcc&view=rev Log: PR bootstrap/87338 * dwarf2out.c (dwarf2out_inline_entry): Use ASM_OUTPUT_DEBUG_LABEL instead of ASM_GENERATE_INTERNAL_LABEL and ASM_OUTPUT_LABEL. Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c
Fixed on trunk so far.
GCC 8.4.0 has been released, adjusting target milestone.
The releases/gcc-9 branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:fe18e4e0845c1821ca51e0a12c284b24a2b60f3a commit r9-9477-gfe18e4e0845c1821ca51e0a12c284b24a2b60f3a Author: James Clarke <jrtc27@jrtc27.com> Date: Fri Apr 30 10:11:17 2021 +0200 bootstrap/87338 - gcc 8.2 fails to bootstrap on ia64 This uses ASM_OUTPUT_DEBUG_LABEL instead of ASM_GENERATE_INTERNAL_LABEL and ASM_OUTPUT_LABEL. 2019-05-21 James Clarke <jrtc27@jrtc27.com> PR bootstrap/87338 * dwarf2out.c (dwarf2out_inline_entry): Use ASM_OUTPUT_DEBUG_LABEL instead of ASM_GENERATE_INTERNAL_LABEL and ASM_OUTPUT_LABEL.
The releases/gcc-8 branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:491d549921d4e93fb8c751c4704070fa4bd940b2 commit r8-10931-g491d549921d4e93fb8c751c4704070fa4bd940b2 Author: James Clarke <jrtc27@jrtc27.com> Date: Fri Apr 30 10:11:17 2021 +0200 bootstrap/87338 - gcc 8.2 fails to bootstrap on ia64 This uses ASM_OUTPUT_DEBUG_LABEL instead of ASM_GENERATE_INTERNAL_LABEL and ASM_OUTPUT_LABEL. 2019-05-21 James Clarke <jrtc27@jrtc27.com> PR bootstrap/87338 * dwarf2out.c (dwarf2out_inline_entry): Use ASM_OUTPUT_DEBUG_LABEL instead of ASM_GENERATE_INTERNAL_LABEL and ASM_OUTPUT_LABEL. (cherry picked from commit fe18e4e0845c1821ca51e0a12c284b24a2b60f3a)
Fixed.