Re: can you turn off compile-time optimization entirely?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 19, 2010 at 5:43 AM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Hi Robert....

On Mon, Apr 19, 2010 at 02:48, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
>
>  for debugging purposes, is it even physically possible to compile
> the kernel with no optimization whatever?

IMO, by turning CONFIG_DEBUG_INFO=y, you actually disable the gcc
optimization (plus enabling the -g option). Or at least, you can
always do it by manually edit the CFLAGS.

Actually CONFIG_DEBUG_INFO doesn't disable optimizations, I noticed that some times the frame pointer and certain local variables are optimized away and this gives unexpected results while debugging. What I do is I put "-02" in CFLAGS_REMOVE and "-O0" in CFLAGS to make debugging give expected results

-Joel


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux