* [Bug lto/46905] -flto -fno-lto does not disable lto
2010-12-12 13:50 [Bug lto/46905] New: -flto -fno-lto does not disable lto andi-gcc at firstfloor dot org
@ 2010-12-12 14:19 ` andi-gcc at firstfloor dot org
2010-12-16 14:37 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: andi-gcc at firstfloor dot org @ 2010-12-12 14:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46905
--- Comment #1 from Andi Kleen <andi-gcc at firstfloor dot org> 2010-12-12 14:19:00 UTC ---
Same bug seems to be in the code generating phase
gcc -O2 -flto -fno-lto object.o
does code generation even if object.o has fallback code
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/46905] -flto -fno-lto does not disable lto
2010-12-12 13:50 [Bug lto/46905] New: -flto -fno-lto does not disable lto andi-gcc at firstfloor dot org
2010-12-12 14:19 ` [Bug lto/46905] " andi-gcc at firstfloor dot org
@ 2010-12-16 14:37 ` rguenth at gcc dot gnu.org
2010-12-19 19:36 ` ak at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-12-16 14:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46905
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-16 14:36:44 UTC ---
I suppose using the linker plugin shows similar effects at link stage? I think
this is a specs issue, the driver passes on -flto* if -fno-lto was on the
commandline.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/46905] -flto -fno-lto does not disable lto
2010-12-12 13:50 [Bug lto/46905] New: -flto -fno-lto does not disable lto andi-gcc at firstfloor dot org
2010-12-12 14:19 ` [Bug lto/46905] " andi-gcc at firstfloor dot org
2010-12-16 14:37 ` rguenth at gcc dot gnu.org
@ 2010-12-19 19:36 ` ak at gcc dot gnu.org
2011-01-08 21:11 ` hubicka at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: ak at gcc dot gnu.org @ 2010-12-19 19:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46905
--- Comment #3 from ak at gcc dot gnu.org 2010-12-19 19:36:29 UTC ---
Author: ak
Date: Sun Dec 19 19:36:25 2010
New Revision: 168071
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168071
Log:
Fix -fno-lto (PR lto/46905)
gcc/
2010-12-19 Andi Kleen <ak@linux.intel.com>
PR lto/46905
* collect2.c (main): Handle -fno-lto.
* opts.c (common_handle_option): Handle -fno-lto.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/collect2.c
trunk/gcc/opts.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/46905] -flto -fno-lto does not disable lto
2010-12-12 13:50 [Bug lto/46905] New: -flto -fno-lto does not disable lto andi-gcc at firstfloor dot org
` (2 preceding siblings ...)
2010-12-19 19:36 ` ak at gcc dot gnu.org
@ 2011-01-08 21:11 ` hubicka at gcc dot gnu.org
2011-01-08 23:35 ` andi-gcc at firstfloor dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-01-08 21:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46905
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-01-08 20:59:58 UTC ---
Linker plugin has also problem of doing LTO even when not asked for. I will
look into it once slib LTO bits are settled.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/46905] -flto -fno-lto does not disable lto
2010-12-12 13:50 [Bug lto/46905] New: -flto -fno-lto does not disable lto andi-gcc at firstfloor dot org
` (3 preceding siblings ...)
2011-01-08 21:11 ` hubicka at gcc dot gnu.org
@ 2011-01-08 23:35 ` andi-gcc at firstfloor dot org
2011-01-09 1:18 ` Jan Hubicka
2011-01-09 0:57 ` andi-gcc at firstfloor dot org
` (2 subsequent siblings)
7 siblings, 1 reply; 10+ messages in thread
From: andi-gcc at firstfloor dot org @ 2011-01-08 23:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46905
--- Comment #5 from Andi Kleen <andi-gcc at firstfloor dot org> 2011-01-08 23:16:25 UTC ---
slim lto will take some time (next stage1)
i also plan to drop most of the code because with forced plugin
the elf code in collect2 should not be needed anymore.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bug lto/46905] -flto -fno-lto does not disable lto
2011-01-08 23:35 ` andi-gcc at firstfloor dot org
@ 2011-01-09 1:18 ` Jan Hubicka
0 siblings, 0 replies; 10+ messages in thread
From: Jan Hubicka @ 2011-01-09 1:18 UTC (permalink / raw)
To: andi-gcc at firstfloor dot org; +Cc: gcc-bugs
> slim lto will take some time (next stage1)
I was chatting about this with Diego yesterday and he seems to be fine with the
basic slim LTO patch getting in. So it seems to me that we might get the slim
LTO patch for 4.6.0 and flip the default for 4.7.0
> i also plan to drop most of the code because with forced plugin
> the elf code in collect2 should not be needed anymore.
I don't know. Current collect2 code is utterly broken by using wrong symbol
table at first place. With GNU LD getting plugin support the situation got
better, but we still have darwin target where we have no linker support at all.
Apple linker has plugin, so probably one can write plugin glue, but until that
happens, we probably want to keep collect2 path somehow useable.
What I am aware of WRT plugin and LTO is that currently plugin force LTO by
default. I.e.
gcc -flto t.c -c
gcc t.o
will result in WHOPR while producing a.out
I ended up enabling plugin by defualt since that is a must for plugin, but plugin
should be extended to work out whether -flto was passed on the command line (or
be better told by the driver as we don't want to duplicate parsing everywhere)
and when lto is not passed do not claim objects that are not slim.
Honza
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/46905] -flto -fno-lto does not disable lto
2010-12-12 13:50 [Bug lto/46905] New: -flto -fno-lto does not disable lto andi-gcc at firstfloor dot org
` (4 preceding siblings ...)
2011-01-08 23:35 ` andi-gcc at firstfloor dot org
@ 2011-01-09 0:57 ` andi-gcc at firstfloor dot org
2011-01-09 1:28 ` hubicka at ucw dot cz
2011-10-07 5:44 ` andi-gcc at firstfloor dot org
7 siblings, 0 replies; 10+ messages in thread
From: andi-gcc at firstfloor dot org @ 2011-01-09 0:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46905
--- Comment #6 from Andi Kleen <andi-gcc at firstfloor dot org> 2011-01-08 23:56:48 UTC ---
And to add: if you have more fixes for -fno-lto please add them now,
don't wait.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/46905] -flto -fno-lto does not disable lto
2010-12-12 13:50 [Bug lto/46905] New: -flto -fno-lto does not disable lto andi-gcc at firstfloor dot org
` (5 preceding siblings ...)
2011-01-09 0:57 ` andi-gcc at firstfloor dot org
@ 2011-01-09 1:28 ` hubicka at ucw dot cz
2011-10-07 5:44 ` andi-gcc at firstfloor dot org
7 siblings, 0 replies; 10+ messages in thread
From: hubicka at ucw dot cz @ 2011-01-09 1:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46905
--- Comment #7 from Jan Hubicka <hubicka at ucw dot cz> 2011-01-09 01:10:25 UTC ---
> slim lto will take some time (next stage1)
I was chatting about this with Diego yesterday and he seems to be fine with the
basic slim LTO patch getting in. So it seems to me that we might get the slim
LTO patch for 4.6.0 and flip the default for 4.7.0
> i also plan to drop most of the code because with forced plugin
> the elf code in collect2 should not be needed anymore.
I don't know. Current collect2 code is utterly broken by using wrong symbol
table at first place. With GNU LD getting plugin support the situation got
better, but we still have darwin target where we have no linker support at all.
Apple linker has plugin, so probably one can write plugin glue, but until that
happens, we probably want to keep collect2 path somehow useable.
What I am aware of WRT plugin and LTO is that currently plugin force LTO by
default. I.e.
gcc -flto t.c -c
gcc t.o
will result in WHOPR while producing a.out
I ended up enabling plugin by defualt since that is a must for plugin, but
plugin
should be extended to work out whether -flto was passed on the command line (or
be better told by the driver as we don't want to duplicate parsing everywhere)
and when lto is not passed do not claim objects that are not slim.
Honza
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/46905] -flto -fno-lto does not disable lto
2010-12-12 13:50 [Bug lto/46905] New: -flto -fno-lto does not disable lto andi-gcc at firstfloor dot org
` (6 preceding siblings ...)
2011-01-09 1:28 ` hubicka at ucw dot cz
@ 2011-10-07 5:44 ` andi-gcc at firstfloor dot org
7 siblings, 0 replies; 10+ messages in thread
From: andi-gcc at firstfloor dot org @ 2011-10-07 5:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46905
Andi Kleen <andi-gcc at firstfloor dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #8 from Andi Kleen <andi-gcc at firstfloor dot org> 2011-10-07 05:43:55 UTC ---
AFAIK this works now.
^ permalink raw reply [flat|nested] 10+ messages in thread