On 10/29/20 8:11 PM, H.J. Lu via Binutils wrote: > diff --git a/configure.ac b/configure.ac > index 7c4bdff0fa..eea9a21099 100644 > --- a/configure.ac > +++ b/configure.ac > + if test "$enable_pgo_build" = "lto"; then > + AC_MSG_CHECKING([whether the compiler supports -flto=jobserver]) > + old_CFLAGS="$CFLAGS" > + PGO_BUILD_LTO_CFLAGS="-flto=jobserver"
that should add -ffat-lto-objects unless you are configuring with --disable-static. > + CFLAGS="$CFLAGS $PGO_BUILD_LTO_CFLAGS" > + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int foo;])],, > + [PGO_BUILD_LTO_CFLAGS=]) > + CFLAGS="$old_CFLAGS" > + if test -n "$PGO_BUILD_LTO_CFLAGS"; then > + AC_MSG_RESULT([yes]) > + else > + AC_MSG_RESULT([no]) > + AC_MSG_WARN([LTO is disabled for the PGO build]) > + fi > + fi Matthias