From: Richard Biener <rguenther@suse.de>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: gcc-patches@gcc.gnu.org, Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH] lto/114655 - -flto=4 at link time doesn't override -flto=auto at compile time
Date: Tue, 9 Apr 2024 14:56:23 +0200 (CEST) [thread overview]
Message-ID: <2o3s98q9-17p3-8s32-q1o8-r25r9n1q6820@fhfr.qr> (raw)
In-Reply-To: <ZhU6FnNsKAZBItz-@kam.mff.cuni.cz>
On Tue, 9 Apr 2024, Jan Hubicka wrote:
> > The following adjusts -flto option processing in lto-wrapper to have
> > link-time -flto override any compile time setting.
> >
> > LTO-boostrapped on x86_64-unknown-linux-gnu, testing in progress.
> >
> > OK for trunk and branches? GCC 11 seems to be unaffected by this.
> >
> > Thanks,
> > Richard.
> >
> > PR lto/114655
> > * lto-wrapper.cc (merge_flto_options): Add force argument.
> > (merge_and_complain): Do not force here.
> > (run_gcc): But here to make the link-time -flto option override
> > any compile-time one.
> Looks good to me. I am actually surprised we propagate -flto settings
> from compile time at all. I guess I never tried it since I never
> assumed it to work :)
We do magic now ;) I think this was done because while people manage
to use CFLAGS=-flto they eventually fail to adjust LDFLAGS and without
plugin auto-loading you won't get LTO and in particular not -flto=auto.
I checked that it now works as expected - fortunately -v now displays
the make invocation command, so it was easy to verify.
Richard.
next prev parent reply other threads:[~2024-04-09 12:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240409124949.31FE93858289@sourceware.org>
2024-04-09 12:52 ` Jan Hubicka
2024-04-09 12:56 ` Richard Biener [this message]
[not found] <49506.124040908491001343@us-mta-292.us.mimecast.lan>
2024-04-09 12:51 ` Jakub Jelinek
2024-04-09 12:49 Richard Biener
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=2o3s98q9-17p3-8s32-q1o8-r25r9n1q6820@fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=jakub@redhat.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).