Re: some questions about GCC's options
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On 6/1/12, xunxun <xunxun1982@xxxxxxxxx> wrote: > 于 2012/6/1 15:59, ohav chochmah 写道: >> On 6/1/12, Ian Lance Taylor<iant@xxxxxxxxxx> wrote: >>> ohav chochmah<philomath868@xxxxxxxxx> writes: >>> >>>> first, is momit-leaf-frame-pointer bad for debugging (in the way >>>> fomit-frame-pointer can be)? >>> It's not as bad. It may still trip up some debuggers. >>> >> but not GDB? >> >>>> if not, why is it disabled by default >>>> even when optimizing (as -Q --help=target | grep omit reveals)? >>> When optimizing on x86 or x86_64, -fomit-frame-pointer is the default >>> anyhow. -fomit-frame-pointer essentially implies >>> -momit-leaf-frame-pointer. >>> >> I was sure that's the answer, but then is GCC lying to me? >> ~ $ gcc -S tst.c -O2 -march=native -Q --help=optimizers | grep omit >> -fomit-frame-pointer [disabled] > x86 or x86_64? > > I remembered -fomit-frame-pointer enabled only on x86_64 by default. x86_64. according to the manual, "Starting with GCC version 4.6, the default setting (when not optimizing for size) for 32-bit Linux x86 and 32-bit Darwin x86 targets has been changed to ‘-fomit-frame-pointer’. The default can be reverted to ‘-fno-omit-frame-pointer’ by configuring GCC with the ‘--enable-frame-pointer’ configure option." it does not mention x86_64. the bottom-line seems to be, that -Q --help=<class> is sometimes inaccurate. > Best Regards, > xunxun all the best.