https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102233
--- Comment #2 from Richard W.M. Jones <rjones at redhat dot com> --- I think since this seems to be LTO-related, you probably do need to use LTO CFLAGS in the initial ./configure step. My actual CFLAGS were: export CFLAGS="$(rpm --eval '%{optflags}')" export CXXFLAGS="$(rpm --eval '%{optflags}')" export LDFLAGS="$(rpm --eval '%{__global_ldflags}')" which on current Fedora will use LTO.