public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/63603] [4.9/5 Regression] Linking with -fno-lto still invokes LTO
Date: Tue, 21 Oct 2014 11:53:00 -0000 [thread overview]
Message-ID: <bug-63603-4-20uA1eELlk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-63603-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63603
--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 21 Oct 2014, burnus at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63603
>
> --- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
> (In reply to Tobias Burnus from comment #2)
> > COLLECT_GCC_OPTIONS='-v' '-fno-use-linker-plugin' '-fno-lto'
> > '-mtune=generic' '-march=x86-64'
> > [...]/collect2 [...]
>
> I haven't shown it, but the collect2 arguments doesn't contain the -fno-lto,
> only COLLECT_GCC_OPTIONS has it.
>
> And in collect2.c's main(), there is a check for
> else if (!strncmp (argv[i], "-fno-lto", 8))
> lto_mode = LTO_MODE_NONE;
> but that only operates on argv and not on COLLECT_GCC_OPTIONS.
That means that
/* We pass any -flto flags on to the linker, which is expected
to understand them. In practice, this means it had better be collect2.
*/
/* %{e*} includes -export-dynamic; see comment in common.opt. */
#ifndef LINK_COMMAND_SPEC
#define LINK_COMMAND_SPEC "\
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%(linker) " \
LINK_PLUGIN_SPEC \
"%{flto|flto=*:%<fcompare-debug*} \
%{flto} %{flto=*} %l " LINK_PIE_SPEC \
doesn't pass on -fno-lto as expected. Does adding %{fno-lto} after
%{flto} work?
next prev parent reply other threads:[~2014-10-21 11:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 13:58 [Bug lto/63603] New: " burnus at gcc dot gnu.org
2014-10-20 15:22 ` [Bug lto/63603] " burnus at gcc dot gnu.org
2014-10-21 8:59 ` rguenth at gcc dot gnu.org
2014-10-21 9:50 ` burnus at gcc dot gnu.org
2014-10-21 10:18 ` burnus at gcc dot gnu.org
2014-10-21 11:53 ` rguenther at suse dot de [this message]
2014-10-22 8:42 ` burnus at gcc dot gnu.org
2014-10-22 8:48 ` rguenther at suse dot de
2014-10-22 21:15 ` burnus at gcc dot gnu.org
2014-10-22 22:10 ` burnus at gcc dot gnu.org
2014-10-23 6:58 ` burnus at gcc dot gnu.org
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=bug-63603-4-20uA1eELlk@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).