tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: gcc 16 bootstrap, stage 2 and 3 differ



On Sun, Aug 16, 2026 at 08:43:25AM +0100, Matthew Green wrote:
> as a random hack, try forcing "-gdwarf-5" into HOST_CFLAGS,
> which would make the stage1 compiler use the same defaults..

I tried

Index: Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/lang/gcc16/Makefile.common,v
retrieving revision 1.1
diff -u -r1.1 Makefile.common
--- Makefile.common	10 Aug 2026 21:41:34 -0000	1.1
+++ Makefile.common	16 Aug 2026 17:50:15 -0000
@@ -94,7 +94,8 @@
 # GCC 16.1.0's stage2/stage3 bootstrap comparison currently fails on
 # NetBSD/x86_64, so disable it. Revisit on updates.
 # https://gcc.gnu.org/pipermail/gcc-help/2026-August/145120.html
-CONFIGURE_ARGS+=	--disable-bootstrap
+#CONFIGURE_ARGS+=	--disable-bootstrap
+CFLAGS+=		-gdwarf-5
 .endif

 .if ${MACHINE_PLATFORM:MNetBSD-*-i386} || ${MACHINE_PLATFORM:MLinux-*-i386}

but that didn't change a thing.

I'm not sure what should have been the outcome, because the stage2
file was already in Dwarf 5 format, see diff:

--- /tmp/stage2.dwarfloc        2026-08-16 17:23:10.166040071 +0000
+++ /tmp/stage3.dwarfloc        2026-08-16 17:23:20.726532494 +0000
@@ -1,10 +1,10 @@

-/tmp/lang/gcc16/work/build/stage2-gcc/c/c-decl.o:     file format elf64-x86-64
+/tmp/lang/gcc16/work/build/stage3-gcc/c/c-decl.o:     file format elf64-x86-64

 Contents of the .debug_loclists section:

 Table at Offset 0
-  Length:          0x2665e
+  Length:          0x2667b
   DWARF version:   5
   Address size:    8
   Segment size:    0


Cheers,
 Thomas


Home | Main Index | Thread Index | Old Index