On Donnerstag, 21. Februar 2008, KH wrote: > James wrote: > > Hello, > > > > > > Current CFLAGS="-O2 -march=i686 -pipe" > > > > > > I want to add "-fomit-frame-pointer" to my > > CFLAGS on an existing system that has been running > > for months. > > > > > > Is this safe or do I have to rebuild everything with > > somelike "emerge -e" ? > > > > > > Should it be avoided completely? > > > > James > > Hi, > > I am not too good in English but I alway understood that: > |-fomit-frame-pointer| > > Don't keep the frame pointer in a register for functions that don't > need one. This avoids the instructions to save, set up and restore > frame pointers; it also makes an extra register available in many > functions. *It also makes debugging impossible on some machines.* > > On some machines, such as the VAX, this flag has no effect, because > the standard calling sequence automatically handles the frame > pointer and nothing is saved by pretending it doesn't exist. The > machine-description macro |FRAME_POINTER_REQUIRED| controls whether > a target machine supports this flag. See Register Usage > > <http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gccint/Registers.html#Registers>. > > > Enabled at levels -O, -O2, -O3, -Os. > > > means, that fomit-frame-pointer is already active when -o ... is choose. > > see > http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Optimize-Options.html#Optimize- >Options
man gcc: -O also turns on -fomit-frame-pointer on machines where doing so does not interfere with debugging. It doesn't hurt to set it anyway. If it is enabled by OX, it will be ignored. -- gentoo-user@lists.gentoo.org mailing list