This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Set default to -fomit-frame-pointer
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>, "jzhang918 at gmail dot com" <jzhang918 at gmail dot com>, "law at redhat dot com" <law at redhat dot com>, "schwab at linux-m68k dot org" <schwab at linux-m68k dot org>, "james dot bowman at ftdichip dot com" <james dot bowman at ftdichip dot com>
- Date: Wed, 8 Nov 2017 17:47:56 +0000
- Subject: Re: [PATCH] Set default to -fomit-frame-pointer
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- Nodisclaimer: True
- References: <DB6PR0801MB2053AA4635AFA1F43ED4C8F2835D0@DB6PR0801MB2053.eurprd08.prod.outlook.com>,<alpine.DEB.2.20.1711031801080.26643@digraph.polyomino.org.uk>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Joseph Myers wrote:
> On Fri, 3 Nov 2017, Wilco Dijkstra wrote:
>
> > Almost all targets add an explict -fomit-frame-pointer in the target specific
> > options. Rather than doing this in a target-specific way, do this in the
>
> Which targets do not? You should explicitly list them and CC their
> maintainers and seek confirmation that such a change is appropriate for
> them.
The targets that don't explicitly enable -fomit-frame-pointer in the target
options or force it internally are bfin, ft32, h8300, m68k - I've CCd the
maintainers (it seems there is no-one for h8300).
> The addition of -fomit-frame-pointer through this mechanism was a
> replacement for the old target macro CAN_DEBUG_WITHOUT_FP. It may now be
> the cases that with DWARF debug info, having or not having a frame pointer
> is not particularly relevant to debugging. But since there are other
> reasons people may want a frame pointer (e.g. light-weight backtraces that
> don't depend on debug / unwind info), it's at least possible there are
> architecture-specific choices regarding keeping frame pointers involved
> here.
I believe in those cases targets already force the frame pointer as required,
for example msp430 sets the frame pointer if unwind tables are emitted
irrespectively of the command-line or default setting. Various other targets
don't even use frame_pointer_needed and just do their own thing.
Wilco