From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from Ishtar.sc.tlinx.org (ishtar.tlinx.org [173.164.175.65]) by sourceware.org (Postfix) with ESMTPS id 57C853896823 for ; Wed, 7 Apr 2021 07:00:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 57C853896823 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tlinx.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gcc@tlinx.org Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id 13770Anw026392; Wed, 7 Apr 2021 00:00:12 -0700 Message-ID: <606D587A.6070007@tlinx.org> Date: Wed, 07 Apr 2021 00:00:10 -0700 From: "Linda A. Walsh" User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Oleg Smolsky , "libc-help@sourceware.org" Subject: Re: Q: -fno-omit-frame-pointer References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2021 07:00:19 -0000 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...