Gentoo Archives: gentoo-embedded

From: Tuurlijk <ldx@××××××××.org>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] x86 SBC Gentoo Embedded HotTo version 0.08
Date: Thu, 22 Sep 2005 07:19:08
Message-Id: 62e2b31080061c0d8d260dcad1423959@monosock.org
In Reply to: Re: [gentoo-embedded] x86 SBC Gentoo Embedded HotTo version 0.08 by Natanael Copa
1 Op 21-sep-05 om 17:44 heeft Natanael Copa het volgende geschreven:
2 >
3 > From the gcc man page:
4 > -O also turns on -fomit-frame-pointer on machines where doing so
5 > does not interfere with debugging.
6 >
7 > If I have undestood this correctly, -fomit-frame-pointer does interfere
8 > with debugging on x86 so -O does not turn it on.
9 >
10 > In other words: On x86 -Os does not turn on -fomit-frame-pointer.
11 >
12 > Correct me if I'm wrong.
13
14 On closer inspection, this appears to be correct indeed. I was misled
15 by:
16
17 -fomit-frame-pointer
18 Don't keep the frame pointer in a register for functions
19 that don't
20 need one. This avoids the instructions to save, set up and
21 restore
22 frame pointers; it also makes an extra register available in
23 many
24 functions. It also makes debugging impossible on some
25 machines.
26
27 On some machines, such as the VAX, this flag has no effect,
28 because
29 the standard calling sequence automatically handles the frame
30 pointer and nothing is saved by pretending it doesn't exist.
31 The
32 machine-description macro "FRAME_POINTER_REQUIRED" controls
33 whether
34 a target machine supports this flag.
35
36 Enabled at levels -O, -O2, -O3, -Os.

Replies

Subject Author
Re: [gentoo-embedded] x86 SBC Gentoo Embedded HotTo version 0.08 Natanael Copa <mlists@××××××.org>