https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98959
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The important difference from my auto-host.h to your auto-host.h which causes this ICE is that you don't have HAVE_LD_LARGE_TOC defined. Manually commenting it out makes the ICE reproduceable.