From: Valdis.Kletnieks@vt.edu (Valdis.Kletnieks at vt.edu) Date: Fri, 22 Mar 2013 17:16:28 -0400 Subject: optimization in kernel compile In-Reply-To: Your message of "Fri, 22 Mar 2013 10:52:56 -0400." <34542.1363963976@turing-police.cc.vt.edu> References: <20130322054125.GA10919@debian.localdomain> <31616.1363960553@turing-police.cc.vt.edu> <20130322143240.GA1502@debian.localdomain> <34542.1363963976@turing-police.cc.vt.edu> Message-ID: <16732.1363986988@turing-police.cc.vt.edu> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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