This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[texi, LTO]: Mention that -flto and -fwhole-program can be used simultaneously


Hi all,

I had the impression that it is not obvious that -fwhole-program can be
applied simultaneously -- and that one may think that -flto already
does the -fwhole-program optimizations as it sees the whole program
(which is not the case).

I therefore propose to add a note to the manual as proposed below.
OK for the trunk? Or do you have a better suggestion for the wording?

Tobias
2009-10-05  Tobias Burnus  <burnus@net-b.de>

	* doc/invoke.texi (-flto,-fwhole-program): Make clear that the
	-flto and -fwhole-program flags can be combined.

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 152454)
+++ gcc/doc/invoke.texi	(working copy)
@@ -7105,9 +7105,9 @@
 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
-@option{--combine} this flag can be used to compile many smaller scale C
-programs since the functions and variables become local for the whole combined
-compilation unit, not for the single source file itself.
+@option{-combine} or @option{-flto} this flag can be used to compile many
+smaller scale programs since the functions and variables become local for the
+whole combined compilation unit, not for the single source file itself.
 
 This option implies @option{-fwhole-file} for Fortran programs.
 
@@ -7223,7 +7223,8 @@
 should use the same link command used when mixing languages in a
 regular (non-LTO) compilation.  This means that if your build process
 was mixing languages before, all you need to add is @option{-flto} to
-all the compile and link commands.
+all the compile and link commands. Note that @option{-flto} can be
+combined with the @option{-fwhole-program} flag.
 
 If object files containing GIMPLE bytecode are stored in a library
 archive, say @file{libfoo.a}, it is possible to extract and use them

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]