Re: O2 flag in compilation

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

 



On 23 Oct 2001, Riccardo Lancellotti wrote:

> AFAIK if you don't use -O2 inline functions are not compiled inline, so
> the linker generates a lot of errors about unresolved symbols.
>

The -O2 flag is a compromise between maximum optimization and gcc screwing
up. Most functions in the kernel are defined as inline functions, gcc will
expand inline functions for you only if you give explicit optimization.
The problem is at -O3 and above gcc will start treating some normal
functions as inline too, so you should use -O2 at the best.

cheers
srp

-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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