From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15291 invoked by alias); 21 Oct 2014 08:40:54 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15261 invoked by uid 48); 21 Oct 2014 08:40:50 -0000 From: "rguenth at gcc dot 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 08:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg01575.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63603 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2014-10-21 CC| |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- I'm quite sure I tested that -fno-lto works. > gcc-4.9 -flto -ffat-lto-objects -c t.c > gcc-4.9 t.o -fno-lto -v 2>&1 | grep lto1 indeed it does. > gcc-4.9 t.o -v 2>&1 | grep lto1 /usr/lib64/gcc/x86_64-suse-linux/4.9/lto1 -quiet -dumpbase t.o -mtune=generic -march=x86-64 -mtune=generic -march=x86-64 -auxbase t -version -fno-trapv -fno-strict-overflow -fltrans-output-list=/tmp/ccRx0SND.ltrans.out -fwpa -fresolution=/tmp/ccnlyyYA.res @/tmp/ccesvcXD /usr/lib64/gcc/x86_64-suse-linux/4.9/lto1 -quiet -dumpbase ccRx0SND.ltrans0.o -mtune=generic -march=x86-64 -mtune=generic -march=x86-64 -auxbase-strip /tmp/ccRx0SND.ltrans0.ltrans.o -version -fno-trapv -fno-strict-overflow -fltrans-output-list=/tmp/ccRx0SND.ltrans.out -fltrans @/tmp/ccq0naMZ -o /tmp/cchrU6el.s Do you use a linker plugin with LTO? That is, what's the value of HAVE_LTO_PLUGIN configure computes for you? Do you happen to run a binutils and have lto_plugin.so installed as auto-load? It seems that lto-plugin.c doesn't reject objects if COLLECT_GCC_OPTIONS contains -fno-lto (but only -fno-use-linker-plugin). Thus can you try if Index: lto-plugin/lto-plugin.c =================================================================== --- lto-plugin/lto-plugin.c (revision 216464) +++ lto-plugin/lto-plugin.c (working copy) @@ -1071,7 +1071,8 @@ onload (struct ld_plugin_tv *tv) for the case where it is auto-loaded by BFD. */ char *collect_gcc_options = getenv ("COLLECT_GCC_OPTIONS"); if (collect_gcc_options - && strstr (collect_gcc_options, "'-fno-use-linker-plugin'")) + && (strstr (collect_gcc_options, "'-fno-use-linker-plugin'") + || strstr (collect_gcc_options, "'-fno-lto'"))) return LDPS_ERR; fixes it for you?