From patchwork Sun Aug 15 21:23:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 61774 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 2E135B70AE for ; Mon, 16 Aug 2010 07:23:26 +1000 (EST) Received: (qmail 4003 invoked by alias); 15 Aug 2010 21:23:23 -0000 Received: (qmail 3954 invoked by uid 22791); 15 Aug 2010 21:23:21 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-qy0-f175.google.com (HELO mail-qy0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 15 Aug 2010 21:23:16 +0000 Received: by qyk11 with SMTP id 11so2794555qyk.20 for ; Sun, 15 Aug 2010 14:23:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.28.137 with SMTP id m9mr2730095qac.381.1281907394082; Sun, 15 Aug 2010 14:23:14 -0700 (PDT) Received: by 10.229.182.18 with HTTP; Sun, 15 Aug 2010 14:23:14 -0700 (PDT) In-Reply-To: References: Date: Sun, 15 Aug 2010 23:23:14 +0200 Message-ID: Subject: Re: [PATCH, doc]: Document -fomit-frame-pointer default change for 32bit Linux and Darwin targets. From: Uros Bizjak To: Gerald Pfeifer Cc: gcc-patches@gcc.gnu.org Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Sun, Aug 15, 2010 at 9:14 PM, Gerald Pfeifer wrote: >> Attached patch adds documentation about -fomit-frame-pointer default >> change on selected x86 targets. > > Thanks for thinking of this, Uros!  Basically the same text looks good > for the GCC 4.6 release notes (http://gcc.gnu.org/gcc-4.6/changes.html) > I think, and I can apply it there for you. Thanks for your kind review. I would really like to ask you to apply the text to HTML, since my CVS skills are a bit rusty (and I don't have a web CVS repository anymore since my last OS install). >>       * doc/invoke.texi (-fomit-frame-pointer): Document that starting >>       from GCC version 4.6, the default setting (when not optimizing > > Is it starting "from" or "with"?  Native speakers welcome! :-) IRC says that we can live with "with". Also some non-scientific measurements: $ grep -i "starting with gcc" doc/*.texi | wc -l 3 $ grep -i "starting from gcc" doc/*.texi | wc -l 1 $ grep -i "starting at gcc" doc/*.texi | wc -l 0 >>       for size) for 32-bit Linux x86 and 32-bit Darwin x86 targets has >>       been changed to -fomit-frame-pointer. > > GNU/Linux or really Linux (that is, everything running a Linux kernel)? It is for everything runing a Linux kernel. In fact, -fomit-frame-pointer can be enabled for all x86_32 targets, the subtarget can be added to line 1583 of gcc/configure.c. ATM this part reads: AC_ARG_ENABLE(frame-pointer, [ --enable-frame-pointer enable -fno-omit-frame-pointer by default for 32bit x86], [], [ case $target_os in linux* | darwin[[8912]]*) # Enable -fomit-frame-pointer by default for Linux and Darwin with # DWARF2. enable_frame_pointer=no ;; *) enable_frame_pointer=yes ;; esac ]) > > +Starting from 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 > +@option{-fomit-frame-pointer}.  New behavior can be reverted back to > +@option{-fno-omit-frame-pointer} by configuring GCC with the > +@option{--enable-frame-pointer} configure option. > > Same comments as for the ChangeLog apply here. > > > And I suggest to slightly change the last sentence a bit to read > >  "The default can be reverted to @option{-fno-omit-frame-pointer} by >  configuring..." > > but that's more a question of style, and thus personal preference. I think that your version sounds better, so I took the liberty and commit attached patch (with corrected ChangeLog). Thanks, Uros. Index: doc/invoke.texi =================================================================== --- doc/invoke.texi (revision 163266) +++ doc/invoke.texi (working copy) @@ -5993,6 +5993,12 @@ whether a target machine supports this flag. @xref{Registers,,Register Usage, gccint, GNU Compiler Collection (GCC) Internals}. +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 +@option{-fomit-frame-pointer}. The default can be reverted to +@option{-fno-omit-frame-pointer} by configuring GCC with the +@option{--enable-frame-pointer} configure option. + Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}. @item -foptimize-sibling-calls