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, 16 Aug 2026, Thomas Klausner wrote:

No real insight here except to ask, are the same command lines being passed
to both the stage2 and stage3 compilers?

Not sure.


You'll have to remove one of the .o files from both directories, then fiddle
with the Makefile (or create a wrapper) so that the `-v' flag gets passed to
both gcc invocations. :(

You could compare only the code bits (ie. omit the debug section comparisons
which're added by as(1)from binutils  anyway). The build instructions suggest
ʽbootstrap-debugʼ:

https://gcc.gnu.org/install/build.html

I tried this.
[...]
it failed again, and now I have much bigger diffs with objdump --dwarf=loc:
[...]
i.e. stage3 has a .debug_loclists section, but stage2 doesn't.


That's expected with `make bootstrap-debug' and shouldn't matter because the
build should be using the `compare-debug' script in the source dir. to do the
stage2 and stage3 cmps; and that *does* work:

```
$ gcc -O2 -c -o x1.o /usr/src/bin/cat/cat.c			# no debug
$ gcc -ggdb -gdwarf-5 -O2 -c -o x2.o /usr/src/bin/cat/cat.c	# DWARF-5 dbg
$ ls -l x1.o x2.o
-rw-------  1 rvp  wheel  12336 Aug 16 22:05 x1.o
-rw-------  1 rvp  wheel  34568 Aug 16 22:05 x2.o
$ ./gcc-16.2.0/contrib/compare-debug x1.o x2.o && echo OK
OK
$
```

Is that script being used?

-RVP


Home | Main Index | Thread Index | Old Index