Hi. Problem here was that GCC-related options are not applied in stage2 (and later stages). It's caused by fact that CXX is xg++ in stage2 (and later stages). Fixed with the following patch.
Ready to be installed? Thanks, Martin libcody/ChangeLog: PR bootstrap/98414 * Makefile.in: In stage2 in UBSAN bootstrap the CXX is called xg++, so findstring g++ should be used instead of exact string comparison. --- libcody/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcody/Makefile.in b/libcody/Makefile.in index 6e38d51516f..1945dc95f14 100644 --- a/libcody/Makefile.in +++ b/libcody/Makefile.in @@ -55,7 +55,7 @@ INSTALL := $(srcdir)/build-aux/install-sh CXXFLAGS := @CXXFLAGS@ CXXINC := $(filter -I%,@CXX@) CXXOPTS := $(CXXFLAGS) @PICFLAG@ -ifeq ($(notdir $(firstword $(CXX))),g++) +ifneq (,$(findstring g++, $(notdir $(firstword $(CXX))))) # It's GCC, or pretending to be it -- so it better smell like it! # Code generation CXXOPTS += -fno-enforce-eh-specs -- 2.29.2