lua-users home
lua-l archive

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


Wolfgang Pupp wrote:
> If debugging is not necessary:
>     -O2 -fomit-frame-pointer

It's a common myth that -fomit-frame-pointer interferes with
debugging (-g). That hasn't been the case in many years for a GNU
toolchain with DWARF debug info.

Also, -fomit-frame-pointer is *implied* by -O2 (or even -O) 'on
machines where doing so does not interfere with debugging' (quote
from GCC manual).

They only kept the behavior on x86 (32 bit) for historic reasons.
But since GCC 4.6, -fomit-frame-pointer is the default on any
currently in use architecture, including x86 (32 bit).

All of that boils down to: ==> Use -O2 <== Period.

--Mike