Richard Fish wrote:

Colin wrote:

Julien Cayzac wrote:

On 5/24/05, Robert Crawford <[EMAIL PROTECTED]> wrote:

For what it's worth, according to man gcc, -O2 turns on
-funit-at-a-time.
Yup. Too bad every single Makefile in the world compiles c/c++ source
files one by one :-/

Wouldn't MAKEOPTS set to at least -j2 attempt to compile in parallel?


How is that supposed to help -funit-at-a-time?  From "info gcc":

----
The compiler performs optimization based on the knowledge it has of
the program.  Using the `-funit-at-a-time' flag will allow the compiler
to consider information gained from later functions in the file when
compiling a function.  Compiling multiple files at once to a single
output file (and using `-funit-at-a-time') will allow the compiler to
use information gained from all of the files when compiling each of
them.
----

So -funit-at-a-time performs best when multiple C/C++ files are compiled
by a single invocation of GCC.  As Julien said, no makefiles in use
today (AFAIK) support this.

Oh, sorry. I thought -funit-at-a-time did parallel compilations. Well, at least I learned something. ^_^U

--
Colin

--
gentoo-user@gentoo.org mailing list

Reply via email to