Re: gcc 16 bootstrap, stage 2 and 3 differ
RVP <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 17 Aug 2026, Thomas Klausner wrote:
> If you don't see the difference (I didn't), its:
>
> -fno-checking
>
> vs.
>
> -fchecking=1
>
> all the rest is the same.
>
That's fine, I should think. It's how the Makefile defines it:
```
619 STAGE1_TFLAGS += -fno-checking
620 STAGE2_CFLAGS += -fno-checking
621 STAGE2_TFLAGS += -fno-checking
622 STAGE3_CFLAGS += -fchecking=1
623 STAGE3_TFLAGS += -fchecking=1
```
> vs. in the build log:
>
> gmake[3]: Leaving directory '/tmp/lang/gcc16/work/build'
> Comparing stages 2 and 3
> warning: gcc/cobol/parse.o differs
> Bootstrap comparison failure!
> gcc/build/genoutput.o differs
> gcc/build/gensupport.o differs
> gcc/build/genrecog.o differs
> gcc/build/genmatch.o differs
> gcc/c/gimple-parser.o differs
> gcc/c/c-typeck.o differs
> gcc/c/c-parser.o differs
> gcc/c/c-decl.o differs
> gcc/cobol/except.o differs
> ...
>
> Looking at the toplevel Makefile, the comparison uses
>
> do-compare = cmp $$f1 $$f2 16 16
>
> which is kind of expected since the configure script sets it to
>
> do_compare="$gcc_cv_prog_cmp_skip"
>
`do-compare' is overridden later on in the Makefile when gcc is being built:
```
1045 BUILD_CONFIG = bootstrap-debug
1046 ifneq ($(BUILD_CONFIG),)
1047 include $(foreach CONFIG, $(BUILD_CONFIG), $(srcdir)/config/$(CONFIG).mk)
1048 endif
```
and in `config/bootstrap-debug.mk' we have:
```
STAGE2_CFLAGS += -gtoggle
do-compare = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2
```
Can you fiddle with the Makefile to show what `do-compare' is at that point?
```
29332 compare:
[...]
29348 $(do-compare) > /dev/null 2>&1; \
```
-RVP