https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89494
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> --- The crash is while compiling C+ code, and your CXXFLAGS still contains -O2: "CXXFLAGS=-g -O2 -pipe -DLIBICONV_PLUG" Try setting CXXFLAGS_FOR_TARGET.