Compile kernel with -fwhole-program --combine

came across a nice article on lwn....

"`-combine'
If you are compiling multiple source files, this option tells the
driver to pass all the source files to the compiler at once (for
those languages for which the compiler can handle this). This
will allow intermodule analysis (IMA) to be performed by the
compiler. Currently the only language for which this is supported
is C. If you pass source files for multiple languages to the
driver, using this option, the driver will invoke the compiler(s)
that support IMA once each, passing each compiler all the source
files appropriate for it. For those languages that do not support
IMA this option will be ignored, and the compiler will be invoked
once for each source file in that language. If you use this
option in conjunction with `-save-temps', the compiler will
generate multiple pre-processed files (one for each source file),
but only one (combined) `.o' or `.s' file.

`-fwhole-program'
Assume that the current compilation unit represents whole program
being compiled. All public functions and variables with the
exception of `main' and those merged by attribute
`externally_visible' become static functions and in a affect gets
more aggressively optimized by interprocedural optimizers. While
this option is equivalent to proper use of `static' keyword for
programs consisting of single file, in combination with option
`--combine' this flag can be used to compile most of smaller scale
C programs since the functions and variables become local for the
whole combined compilation unit, not for the single source file
itself. "


I recently picked up Nokia N73....i haven't made the best use of it yet...looking forward to do it once i reach Kuala Lumpur...


About this entry


0 comments: