https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98414
--- Comment #14 from Martin Liška <marxin at gcc dot gnu.org> --- When building GCC w/o bootstrap I see that libcody properly sets -fno-rtti: g++ -std=c++11 -g -O2 -fno-enforce-eh-specs -fno-stack-protector -fno-threadsafe-statics -fno-exceptions -fno-rtti -fdebug-prefix-map=/home/marxin/Programming/gcc/libcody/= -W -Wall -include config.h -I/home/marxin/Programming/gcc/libcody \ -MMD -MP -MF packet.d -c -o packet.o /home/marxin/Programming/gcc/libcody/packet.cc But it's not true for --with-build-config=bootstrap-ubsan in stage2: /home/mliska/Programming/gcc/objdir/./prev-gcc/xg++ -B/home/mliska/Programming/gcc/objdir/./prev-gcc/ -B/usr/local/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -I/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include -I/home/mliska/Programming/gcc/libstdc++-v3/libsupc++ -L/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -g -O2 -fno-checking -fsanitize=undefined -DUBSAN_BOOTSTRAP -include config.h -I../../libcody -I/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include -I/home/mliska/Programming/gcc/libstdc++-v3/libsupc++ \ -MMD -MP -MF packet.d -c -o packet.o ../../libcody/packet.cc while other gcc/*.o objects have -fno-rtti: /home/mliska/Programming/gcc/objdir/./prev-gcc/xg++ -B/home/mliska/Programming/gcc/objdir/./prev-gcc/ -B/usr/local/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -I/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include -I/home/mliska/Programming/gcc/libstdc++-v3/libsupc++ -L/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/mliska/Programming/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -fno-PIE -c -g -O2 -fno-checking -fsanitize=undefined -DUBSAN_BOOTSTRAP -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libcody -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc/../libbacktrace -o ipa-icf.o -MT ipa-icf.o -MMD -MP -MF ./.deps/ipa-icf.TPo ../../gcc/ipa-icf.c