From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Warnings when building with LTO Date: Fri, 10 May 2019 00:23:30 -0700 Message-ID: <6d4d46c8-d11d-976b-7c82-584e1b97021a@cs.ucla.edu> References: <87imujckfx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="24901"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cc: emacs-devel@gnu.org To: Alex Gramiak Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 10 09:25:08 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOzu0-0006JY-Lq for ged-emacs-devel@m.gmane.org; Fri, 10 May 2019 09:25:08 +0200 Original-Received: from localhost ([127.0.0.1]:38266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOztw-0004B3-Mx for ged-emacs-devel@m.gmane.org; Fri, 10 May 2019 03:25:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzsW-0003jp-Vj for emacs-devel@gnu.org; Fri, 10 May 2019 03:23:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOzsV-0006Sx-Gl for emacs-devel@gnu.org; Fri, 10 May 2019 03:23:36 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35278) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hOzsV-0006Rq-7M for emacs-devel@gnu.org; Fri, 10 May 2019 03:23:35 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8D29B1619AC; Fri, 10 May 2019 00:23:32 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id df6tkBdnmRmT; Fri, 10 May 2019 00:23:31 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 04C4D1619C2; Fri, 10 May 2019 00:23:31 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id tDdSz74sZ_2p; Fri, 10 May 2019 00:23:30 -0700 (PDT) Original-Received: from [100.77.170.222] (unknown [12.129.159.195]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id D7848161058; Fri, 10 May 2019 00:23:30 -0700 (PDT) In-Reply-To: <87imujckfx.fsf@gmail.com> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236355 Archived-At: On 5/9/19 3:49 PM, Alex Gramiak wrote: > INSTALL states: > > Link time optimization is not the default as it tends to cause crashes > and to make Emacs slower. > > > Is this still true with GCC 9.1? Not clear. Nobody's really tried it as far as I know. Few people are using LTO and to some extent it's a chicken-and-egg problem. See, for example, this recent LTO problem on macOS: https://lists.gnu.org/r/emacs-devel/2019-05/msg00077.html for why I still don't recommend using LTO unless your job is to debug LTO. > Paul, can you still reproduce the > bug[2] you mentioned in commit 9b4b2e9fc8 with GCC 9.1? > > > [2] https://bugzilla.redhat.com/show_bug.cgi?id=1486455 No, it's fixed for me now (Fedora 30 x86-64, 9.1.1 20190503 (Red Hat 9.1.1-1), current master). I assume that all the warnings you mention are bogus, though I haven't checked this. It would not be wise to attempt to pacify GCC on all platforms, as it (1) would take a lot of time and (2) would clutter the code and get in the way of real work. So we tend to pacify GCC only for recent GCC with default compiler flags. If LTO becomes the default or is otherwise commonly used we should pacify the warnings you mention; until then, I wouldn't bother.