optimization in kernel compile

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Fri Mar 22 17:16:28 EDT 2013


On Fri, 22 Mar 2013 10:52:56 -0400, Valdis.Kletnieks at vt.edu said:

> No debug information is stripped by -O2.  Debug information isn't emitted if
> you don't compile with -g.  At one time, long ago (quite possibly literally
> "before you were born" for some of the younger readers on the list), gcc was
> unable to generate -g output if the optimizer was invoked.  But that was
> last century (gcc 2.95 era).

GCC 4.8 was officially released today (since I sent the previous note).

>From the release notes:

"A new general optimization level, -Og, has been introduced. It addresses the
need for fast compilation and a superior debugging experience while providing a
reasonable level of runtime performance. Overall experience for development
should be better than the default optimization level -O0."

The current Linus tree does build with 4.8.  I do *not* know if earlier
releases build correctly (or how far back), nor if -Og is sufficient
optimization to allow correct kernel functioning.  But it's something to
look at.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130322/4fbf18c9/attachment.bin 


More information about the Kernelnewbies mailing list