Add the --enable-pgo-build[=lto] configure option. When binutils+gdb is not built together with GCC, --enable-pgo-build enables the PGO build:
1. First build with -fprofile-generate. 2. Use "make maybe-check-*" to generate profiling data and pass -i to make to ignore errors when generating profiling data. 3. Use "make clean" to remove the previous build. 4. Rebuild with -fprofile-use. H.J. Lu (2): Sync with binutils: GCC: Pass --plugin to AR and RANLIB Sync with binutils: Support the PGO build for binutils+gdb Makefile.in | 68 ++++++++++++++++++-- Makefile.tpl | 63 +++++++++++++++++-- config/gcc-plugin.m4 | 28 +++++++++ configure | 139 ++++++++++++++++++++++++++++++++++++++++- configure.ac | 80 ++++++++++++++++++++++++ libiberty/Makefile.in | 5 +- libiberty/aclocal.m4 | 1 + libiberty/configure | 37 +++++++++++ libiberty/configure.ac | 12 ++++ libtool.m4 | 25 +++++++- zlib/configure | 29 ++++++++- 11 files changed, 471 insertions(+), 16 deletions(-) -- 2.33.1