From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6051 invoked by alias); 1 Jun 2012 09:44:07 -0000 Received: (qmail 6029 invoked by uid 22791); 1 Jun 2012 09:44:05 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_NX X-Spam-Check-By: sourceware.org Received: from mail-lpp01m010-f47.google.com (HELO mail-lpp01m010-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jun 2012 09:43:52 +0000 Received: by lags15 with SMTP id s15so1489637lag.20 for ; Fri, 01 Jun 2012 02:43:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.38.161 with SMTP id h1mr1529819lbk.85.1338543830724; Fri, 01 Jun 2012 02:43:50 -0700 (PDT) Received: by 10.152.13.37 with HTTP; Fri, 1 Jun 2012 02:43:50 -0700 (PDT) In-Reply-To: <4FC876E2.5050706@gmail.com> References: <4FC876E2.5050706@gmail.com> Date: Fri, 01 Jun 2012 09:44:00 -0000 Message-ID: Subject: Re: some questions about GCC's options From: ohav chochmah To: xunxun Cc: Ian Lance Taylor , gcc-help Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-06/txt/msg00003.txt.bz2 On 6/1/12, xunxun wrote: > =E4=BA=8E 2012/6/1 15:59, ohav chochmah =E5=86=99=E9=81=93: >> On 6/1/12, Ian Lance Taylor wrote: >>> ohav chochmah 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=3Dtarget | 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=3Dnative -Q --help=3Doptimizers | 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 =E2=80=98-fomit-frame-pointer=E2=80= =99. The default can be reverted to =E2=80=98-fno-omit-frame-pointer=E2=80=99 by con= figuring GCC with the =E2=80=98--enable-frame-pointer=E2=80=99 configure option." i= t does not mention x86_64. the bottom-line seems to be, that -Q --help=3D is sometimes inaccura= te. > Best Regards, > xunxun all the best.