Re: gcc 16 bootstrap, stage 2 and 3 differ
Thomas Klausner <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Aug 16, 2026 at 10:14:23PM +0100, RVP wrote: > 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. :( I've deleted stage2 and stage3 c-decl.o, and passed 'V=1 VERBOSE=1' in the MAKE_ARGS. This gives me: /tmp/lang/gcc16/work/build/./prev-gcc/xg++ -B/tmp/lang/gcc16/work/build/./prev-gcc/ -B/usr/pkg/gcc16/x86_64--netbsd/bin/ -nostdinc++ -B/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/src/.libs -B/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/libsupc++/.libs -I/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/include/x86_64--netbsd -I/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/include -I/tmp/lang/gcc16/work/gcc-16.1.0/libstdc++-v3/libsupc++ -L/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/src/.libs -L/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/libsupc++/.libs -fno-PIE -c -DIN_GCC_FRONTEND -g -O2 -fno-checking -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -fno-PIE -I. -Ic -I../../gcc-16.1.0/gcc -I../../gcc-16.1.0/gcc/c -I../../gcc-16.1.0/gcc/../include -I../../gcc-16.1.0/gcc/../libcpp/include -I../../gcc-16.1.0/gcc/../libcody -I/tmp/lang/gcc16/work/build/./gmp -I/tmp/lang/gcc16/work/gcc-16.1.0/gmp -I/tmp/lang/gcc16/work/build/./mpfr/src -I/tmp/lang/gcc16/work/gcc-16.1.0/mpfr/src -I/tmp/lang/gcc16/work/gcc-16.1.0/mpc/src -I../../gcc-16.1.0/gcc/../libdecnumber -I../../gcc-16.1.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-16.1.0/gcc/../libbacktrace -I/tmp/lang/gcc16/work/build/./isl/include -I/tmp/lang/gcc16/work/gcc-16.1.0/isl/include -I/usr/include -I/usr/pkg/include/libxml2 -o c/c-decl.o -MT c/c-decl.o -MMD -MP -MF c/.deps/c-decl.TPo ../../gcc-16.1.0/gcc/c/c-decl.cc and /tmp/lang/gcc16/work/build/./prev-gcc/xg++ -B/tmp/lang/gcc16/work/build/./prev-gcc/ -B/usr/pkg/gcc16/x86_64--netbsd/bin/ -nostdinc++ -B/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/src/.libs -B/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/libsupc++/.libs -I/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/include/x86_64--netbsd -I/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/include -I/tmp/lang/gcc16/work/gcc-16.1.0/libstdc++-v3/libsupc++ -L/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/src/.libs -L/tmp/lang/gcc16/work/build/prev-x86_64--netbsd/libstdc++-v3/libsupc++/.libs -fno-PIE -c -DIN_GCC_FRONTEND -g -O2 -fchecking=1 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -fno-PIE -I. -Ic -I../../gcc-16.1.0/gcc -I../../gcc-16.1.0/gcc/c -I../../gcc-16.1.0/gcc/../include -I../../gcc-16.1.0/gcc/../libcpp/include -I../../gcc-16.1.0/gcc/../libcody -I/tmp/lang/gcc16/work/build/./gmp -I/tmp/lang/gcc16/work/gcc-16.1.0/gmp -I/tmp/lang/gcc16/work/build/./mpfr/src -I/tmp/lang/gcc16/work/gcc-16.1.0/mpfr/src -I/tmp/lang/gcc16/work/gcc-16.1.0/mpc/src -I../../gcc-16.1.0/gcc/../libdecnumber -I../../gcc-16.1.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-16.1.0/gcc/../libbacktrace -I/tmp/lang/gcc16/work/build/./isl/include -I/tmp/lang/gcc16/work/gcc-16.1.0/isl/include -I/usr/include -I/usr/pkg/include/libxml2 -o c/c-decl.o -MT c/c-decl.o -MMD -MP -MF c/.deps/c-decl.TPo ../../gcc-16.1.0/gcc/c/c-decl.cc If you don't see the difference (I didn't), its: -fno-checking vs. -fchecking=1 all the rest is the same. > 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? I guess not: # ./work//gcc-16.1.0/contrib/compare-debug work/build/stage2-gcc/c/c-decl.o work/build/stage3-gcc/c/c-decl.o # echo $? 0 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" Thomas