From: Jeff Law <jeffreyalaw@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 2/2] Sync with binutils: Support the PGO build for binutils+gdb
Date: Wed, 15 Dec 2021 13:25:43 -0700 [thread overview]
Message-ID: <6eb5bfa9-b1e1-fa6f-3d59-d776becae315@gmail.com> (raw)
In-Reply-To: <20211113163353.5374-3-hjl.tools@gmail.com>
On 11/13/2021 9:33 AM, H.J. Lu via Gcc-patches wrote:
> Sync with binutils for building binutils with LTO:
>
> From af019bfde9b13d628202fe58054ec7ff08d92a0f Mon Sep 17 00:00:00 2001
> From: "H.J. Lu" <hjl.tools@gmail.com>
> Date: Sat, 9 Jan 2021 06:51:15 -0800
> Subject: [PATCH] Support the PGO build for binutils+gdb
>
> 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.
>
> With --enable-pgo-build=lto, -flto=jobserver -ffat-lto-objects are used
> together with -fprofile-generate and -fprofile-use. Add '+' to the command
> line for recursive make to support -flto=jobserver -ffat-lto-objects.
>
> NB: --enable-pgo-build=lto enables the PGO build with LTO while
> --enable-lto enables LTO support in toolchain.
>
> PR binutils/26766
> * Makefile.tpl (BUILD_CFLAGS): New.
> (CFLAGS): Append $(BUILD_CFLAGS).
> (CXXFLAGS): Likewise.
> (PGO_BUILD_GEN_FLAGS_TO_PASS): New.
> (PGO_BUILD_TRAINING_CFLAGS): Likewise.
> (PGO_BUILD_TRAINING_CXXFLAGS): Likewise.
> (PGO_BUILD_TRAINING_FLAGS_TO_PASS): Likewise.
> (PGO_BUILD_TRAINING_MFLAGS): Likewise.
> (PGO_BUILD_USE_FLAGS_TO_PASS): Likewise.
> (PGO-TRAINING-TARGETS): Likewise.
> (PGO_BUILD_TRAINING): Likewise.
> (all): Add '+' to the command line for recursive make. Support
> the PGO build.
> * configure.ac: Add --enable-pgo-build[=lto].
> AC_SUBST PGO_BUILD_GEN_CFLAGS, PGO_BUILD_USE_CFLAGS and
> PGO_BUILD_LTO_CFLAGS. Enable the PGO build in Makefile.
> * Makefile.in: Regenerated.
> * configure: Likewise.
My understanding is this is just syncing us with binutils. So OK.
jeff
prev parent reply other threads:[~2021-12-15 20:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-13 16:33 [PATCH 0/2] Sync with binutils for building binutils with LTO: H.J. Lu
2021-11-13 16:33 ` [PATCH 1/2] Sync with binutils: GCC: Pass --plugin to AR and RANLIB H.J. Lu
2021-11-23 0:29 ` Jeff Law
2021-11-23 2:29 ` H.J. Lu
2021-12-14 23:30 ` Jeff Law
2021-12-15 0:29 ` H.J. Lu
2021-12-15 17:33 ` Jeff Law
2021-12-16 3:37 ` Sandra Loosemore
2021-12-16 4:28 ` H.J. Lu
2021-12-16 4:38 ` H.J. Lu
2021-12-16 5:34 ` Sandra Loosemore
2021-11-13 16:33 ` [PATCH 2/2] Sync with binutils: Support the PGO build for binutils+gdb H.J. Lu
2021-12-15 20:25 ` Jeff Law [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6eb5bfa9-b1e1-fa6f-3d59-d776becae315@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).