public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* Q: -fno-omit-frame-pointer
@ 2021-03-31 21:23 Oleg Smolsky
  2021-04-01 14:38 ` Adhemerval Zanella
  2021-04-07  7:00 ` Linda A. Walsh
  0 siblings, 2 replies; 3+ messages in thread
From: Oleg Smolsky @ 2021-03-31 21:23 UTC (permalink / raw)
  To: Oleg Smolsky via Libc-help

Folks, what is the default for x88-64 builds w.r.t. the frame pointers? (I
think it's "off"). I couldn't find a configure.ac option to tweak that...
yet it's easy to force via CFLAGS.

Is glibc known to work with the frame pointers? Does the test suite cover
whatever kinks come from forcing that via CFLAGS?

Thanks in advance!
Oleg.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Q: -fno-omit-frame-pointer
  2021-03-31 21:23 Q: -fno-omit-frame-pointer Oleg Smolsky
@ 2021-04-01 14:38 ` Adhemerval Zanella
  2021-04-07  7:00 ` Linda A. Walsh
  1 sibling, 0 replies; 3+ messages in thread
From: Adhemerval Zanella @ 2021-04-01 14:38 UTC (permalink / raw)
  To: Oleg Smolsky, Libc-help



On 31/03/2021 18:23, Oleg Smolsky via Libc-help wrote:
> Folks, what is the default for x88-64 builds w.r.t. the frame pointers? (I
> think it's "off"). I couldn't find a configure.ac option to tweak that...
> yet it's easy to force via CFLAGS.
> 
> Is glibc known to work with the frame pointers? Does the test suite cover
> whatever kinks come from forcing that via CFLAGS?
> 

We use the compiler and cflags default with exception of some specific
objects (and to which I am not it is strictly required, the exception
based mechanism on most architectures are done through libgcc and
dwarf unwind).

At least for i386, we fixed some issues to build with -fno-omit-frame-pointer
(BZ#21029).  Afaik gcc 4.6 set to -fomit-frame-pointer as default, but
I am not sure if it is enforced on all architectures.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Q: -fno-omit-frame-pointer
  2021-03-31 21:23 Q: -fno-omit-frame-pointer Oleg Smolsky
  2021-04-01 14:38 ` Adhemerval Zanella
@ 2021-04-07  7:00 ` Linda A. Walsh
  1 sibling, 0 replies; 3+ messages in thread
From: Linda A. Walsh @ 2021-04-07  7:00 UTC (permalink / raw)
  To: Oleg Smolsky, libc-help

On 2021/03/31 14:23, Oleg Smolsky via Libc-help wrote:
> Folks, what is the default for x88-64 builds w.r.t. the frame pointers? (I
> think it's "off"). I couldn't find a configure.ac option to tweak that...
> yet it's easy to force via CFLAGS.
>   
The defaults may be different on your machine and by debug/optimization
switches.

To see which switches are turned on for a given optimization,
use -Q -O(0-3) --help=optimizers
On my machine, I ran
 gcc -c -Q -O3 --help=optimizers >/tmp/O3-opts 
subbing in O2, O1 and O0 then searching through the output:
grep omit-frame *opts
O0-opts:  -fomit-frame-pointer            [disabled]
O1-opts:  -fomit-frame-pointer            [enabled]
O2-opts:  -fomit-frame-pointer            [enabled]
O3-opts:  -fomit-frame-pointer            [enabled]
---

So looks like frame-ptr is usually omitted, but not in O0...
Debug options may also affect it being turned on or off...




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-07  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31 21:23 Q: -fno-omit-frame-pointer Oleg Smolsky
2021-04-01 14:38 ` Adhemerval Zanella
2021-04-07  7:00 ` Linda A. Walsh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).