Re: optimization in kernel compile

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

 



On Fri, 22 Mar 2013 13:41:25 +0800, ishare said:
>   Is it  needed or must to compile fs and driver with -O2 option when compiling kernel ?

It's not strictly mandatory to use -O2 (for a while, -Os was the default). There
are a few places that for correctness, you *cannot* use -O0. For instance, a
few places where we use builtin_return_address() inside an inline (-O0
won't inline so builtin_return_address() ends up returning a pointer to
a function when we want the function's parent).

Since gdb and friends are able to deal with -O2 compiled code just fine,
there's really no reason *not* to optimize the kernel.

Attachment: pgpIUxOCd2SrK.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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