Commit 2c653d46 by Richard Biener Committed by Richard Biener

invoke.texi (fwhole-program): Discourage use in combination with -flto.

2013-03-07  Richard Biener  <rguenther@suse.de>

	* doc/invoke.texi (fwhole-program): Discourage use in combination
	with -flto.

From-SVN: r196518
parent 5709153c
2013-03-07 Richard Biener <rguenther@suse.de>
* doc/invoke.texi (fwhole-program): Discourage use in combination
with -flto.
2013-03-06 Jakub Jelinek <jakub@redhat.com> 2013-03-06 Jakub Jelinek <jakub@redhat.com>
* config/arm/t-arm (TM_H, OPTIONS_H_EXTRA): Add arm-cores.def. * config/arm/t-arm (TM_H, OPTIONS_H_EXTRA): Add arm-cores.def.
......
...@@ -8168,15 +8168,11 @@ Enabled by default with @option{-funroll-loops}. ...@@ -8168,15 +8168,11 @@ Enabled by default with @option{-funroll-loops}.
Assume that the current compilation unit represents the whole program being Assume that the current compilation unit represents the whole program being
compiled. All public functions and variables with the exception of @code{main} compiled. All public functions and variables with the exception of @code{main}
and those merged by attribute @code{externally_visible} become static functions and those merged by attribute @code{externally_visible} become static functions
and in effect are optimized more aggressively by interprocedural optimizers. If @command{gold} is used as the linker plugin, @code{externally_visible} attributes are automatically added to functions (not variable yet due to a current @command{gold} issue) that are accessed outside of LTO objects according to resolution file produced by @command{gold}. For other linkers that cannot generate resolution file, explicit @code{externally_visible} attributes are still necessary. and in effect are optimized more aggressively by interprocedural optimizers.
While this option is equivalent to proper use of the @code{static} keyword for
programs consisting of a single file, in combination with option In combination with @code{-flto} using this option should not be used.
@option{-flto} this flag can be used to Instead relying on a linker plugin should provide safer and more precise
compile many smaller scale programs since the functions and variables become information.
local for the whole combined compilation unit, not for the single source file
itself.
This option implies @option{-fwhole-file} for Fortran programs.
@item -flto[=@var{n}] @item -flto[=@var{n}]
@opindex flto @opindex flto
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment