https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96407
Mark Wielaard <mark at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at gcc dot gnu.org --- Comment #1 from Mark Wielaard <mark at gcc dot gnu.org> --- Same for using -Wstack-usage= on the command line. It is one of the workarounds needed for building elfutils with LTO enabled: https://sourceware.org/pipermail/elfutils-devel/2020q2/002733.html This version of elfutils handles debuginfo generated with GCC LTO better and it can finally be build with GCC LTO itself: export AR=gcc-ar RANLIB=gcc-ranlib NM=gcc-nm ./configure CFLAGS="-O2 -g -flto=auto -flto-partition=none \ -Wno-error=stack-usage=" \ CXXFLAGS="-O2 -g -flto=auto -flto-partition=none" Note the two workaround. -flto-partition=none is needed to preserve the symbol versioning. -Wno-error=stack-usage= is needed because LTO will combine objects build with and without a -Wstack-usage limit.