Gentoo Archives: gentoo-user

From: Volker Armin Hemmann <volker.armin.hemmann@××××××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] CFLAGS changes
Date: Thu, 21 Feb 2008 16:13:25
Message-Id: 200802211712.12695.volker.armin.hemmann@tu-clausthal.de
In Reply to: Re: [gentoo-user] CFLAGS changes by KH
1 On Donnerstag, 21. Februar 2008, KH wrote:
2 > James wrote:
3 > > Hello,
4 > >
5 > >
6 > > Current CFLAGS="-O2 -march=i686 -pipe"
7 > >
8 > >
9 > > I want to add "-fomit-frame-pointer" to my
10 > > CFLAGS on an existing system that has been running
11 > > for months.
12 > >
13 > >
14 > > Is this safe or do I have to rebuild everything with
15 > > somelike "emerge -e" ?
16 > >
17 > >
18 > > Should it be avoided completely?
19 > >
20 > > James
21 >
22 > Hi,
23 >
24 > I am not too good in English but I alway understood that:
25 > |-fomit-frame-pointer|
26 >
27 > Don't keep the frame pointer in a register for functions that don't
28 > need one. This avoids the instructions to save, set up and restore
29 > frame pointers; it also makes an extra register available in many
30 > functions. *It also makes debugging impossible on some machines.*
31 >
32 > On some machines, such as the VAX, this flag has no effect, because
33 > the standard calling sequence automatically handles the frame
34 > pointer and nothing is saved by pretending it doesn't exist. The
35 > machine-description macro |FRAME_POINTER_REQUIRED| controls whether
36 > a target machine supports this flag. See Register Usage
37 >
38 > <http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gccint/Registers.html#Registers>.
39 >
40 >
41 > Enabled at levels -O, -O2, -O3, -Os.
42 >
43 >
44 > means, that fomit-frame-pointer is already active when -o ... is choose.
45 >
46 > see
47 > http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Optimize-Options.html#Optimize-
48 >Options
49
50 man gcc:
51 -O also turns on -fomit-frame-pointer on machines where doing so does not
52 interfere with debugging.
53
54 It doesn't hurt to set it anyway. If it is enabled by OX, it will be ignored.
55 --
56 gentoo-user@l.g.o mailing list