https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119012
--- Comment #2 from Levi Zim <rsworktech at outlook dot com> --- (In reply to Andrew Pinski from comment #1) > Can you attach the preprocessed source for rust-lex.cc ? Do you mean re-running the command that produces rust-lex.o but with -save-temps? > The big difference between stage1 and stage2 is debug info. Yes, but here what differs are stage 2 and stage 3. I could not relate it to stage 1. > Can can you post the exact configure command that you are building with > rather than the build script since it is NOT obvious the options being used. Configure: env CFLAGS=$'-march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -fstack-clash-protection -fno-omit-frame-pointer -g -ffile-prefix-map=/build/gcc/src=/usr/src/debug/gcc' \ CHOST=riscv64-unknown-linux-gnu COMMAND_MODE=legacy CXXFLAGS=$'-march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -fstack-clash-protection -fno-omit-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/gcc/src=/usr/src/debug/gcc' \ DEBUG_FFLAGS=$' -ffile-prefix-map=/build/gcc/src=/usr/src/debug/gcc' DEBUG_RUSTFLAGS=$' --remap-path-prefix=/build/gcc/src=/usr/src/debug/gcc' \ FCFLAGS=$' -ffile-prefix-map=/build/gcc/src=/usr/src/debug/gcc' FFLAGS=$' -ffile-prefix-map=/build/gcc/src=/usr/src/debug/gcc' \ LDFLAGS=$'-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now' \ MAKEFLAGS=-j56 PYTHONHASHSEED=0 RUSTFLAGS=$' --remap-path-prefix=/build/gcc/src=/usr/src/debug/gcc' \ SHLVL=1 SOURCE_DATE_EPOCH=1740570247 LANG=C.UTF-8 \ ../gcc/configure $'--enable-languages=c,c++,lto,rust' --enable-bootstrap \ $'--prefix=/usr' $'--libdir=/usr/lib' $'--libexecdir=/usr/lib' $'--mandir=/usr/share/man' $'--infodir=/usr/share/info' \ $'--with-build-config=bootstrap-lto' $'--with-linker-hash-style=gnu' --with-system-zlib --enable-__cxa_atexit \ $'--enable-cet=auto' $'--enable-checking=release' $'--enable-clocale=gnu' --enable-default-pie --enable-default-ssp \ --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace $'--enable-link-serialization=1' \ --enable-linker-build-id --enable-lto --disable-multilib --enable-plugin --enable-shared $'--enable-threads=posix' \ --disable-libssp --disable-libstdcxx-pch --disable-werror Build: env CFLAGS=$'-march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -fstack-clash-protection -fno-omit-frame-pointer -g -ffile-prefix-map=/build/gcc/src=/usr/src/debug/gcc' \ CHOST=riscv64-unknown-linux-gnu COMMAND_MODE=legacy \ CXXFLAGS=$'-march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -fstack-clash-protection -fno-omit-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/gcc/src=/usr/src/debug/gcc' \ DEBUG_FFLAGS=$' -ffile-prefix-map=/build/gcc/src=/usr/src/debug/gcc' DEBUG_RUSTFLAGS=$' --remap-path-prefix=/build/gcc/src=/usr/src/debug/gcc' \ FCFLAGS=$' -ffile-prefix-map=/build/gcc/src=/usr/src/debug/gcc' FFLAGS=$' -ffile-prefix-map=/build/gcc/src=/usr/src/debug/gcc' \ LDFLAGS=$'-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now' MAKEFLAGS=-j56 PYTHONHASHSEED=0 \ RUSTFLAGS=$' --remap-path-prefix=/build/gcc/src=/usr/src/debug/gcc' SOURCE_DATE_EPOCH=1740570247 LANG=C.UTF-8 \ make -O $'STAGE1_CFLAGS=-O2' \ $'BOOT_CFLAGS=-march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -fstack-clash-protection -fno-omit-frame-pointer -g -ffile-prefix-map=/build/gcc/src=/usr/src/debug/gcc' \ $'BOOT_LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now' \ $'LDFLAGS_FOR_TARGET=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now' bootstrap I am now also trying to reproduce it outside our packaging infra. > > Also the comparison script is different from the what you are doing for > comparison so what you think is the different is incorrect. > > It uses $(srcdir)/contrib/compare-lto to the comparison. I am aware of it. The output of diffscope is for reference only.