https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77917
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to PeteVine from comment #7) > BTW, I sincerely hope `--with-build-config=bootstrap-lto` is not derailed by > the presence of `-flto` among environment C(XX)FLAGS, as otherwise it > definitely makes sense for configure to always sanitize those flags. With --with-build-config=bootstrap-lto you will not need -flto in C(XX)FLAGS. Really -flto in C(XX)FLAGS is the cause of the problem you are running into.