From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with native-compilation Date: Fri, 23 Jun 2023 15:15:15 +0300 Message-ID: <83jzvu1ijw.fsf@gnu.org> References: <86v8ffutg7.fsf@gnu.org> <838rca3frp.fsf@gnu.org> <86edm2jtih.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3458"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63365@debbugs.gnu.org, acorallo@gnu.org, svraka.andras@gmail.com, cyril.arnould@outlook.com To: Arash Esbati Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 23 14:16:21 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qCfi9-0000hs-6d for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Jun 2023 14:16:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCfhr-0001YO-AI; Fri, 23 Jun 2023 08:16:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCfhq-0001W4-KY for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2023 08:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qCfhq-00082N-6U for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2023 08:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCfhp-0004kw-SV for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2023 08:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jun 2023 12:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63365 X-GNU-PR-Package: emacs Original-Received: via spool by 63365-submit@debbugs.gnu.org id=B63365.168752252418237 (code B ref 63365); Fri, 23 Jun 2023 12:16:01 +0000 Original-Received: (at 63365) by debbugs.gnu.org; 23 Jun 2023 12:15:24 +0000 Original-Received: from localhost ([127.0.0.1]:37825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCfhC-0004k3-MO for submit@debbugs.gnu.org; Fri, 23 Jun 2023 08:15:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCfh7-0004jf-CI for 63365@debbugs.gnu.org; Fri, 23 Jun 2023 08:15:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCfh1-0007OQ-Kr; Fri, 23 Jun 2023 08:15:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=l4HyV3vwhpkRa8ul9P/dGWWs6rp+HcgErIqVR1o/T+4=; b=HWepjs3Nqq4r5tAnttli Y/gPC0NMfasWN6LVWd+Kac6cwByNJFHk3Hc8gygUQ8NBzvUELOJx5FV3NkeIYExNNIjb8g3bQlRPK wSFxTJY5b5a3zNJDw27Hx20lW5I5dDfMJdPmzH/keCMZtlQLxXDrV2P7Yo5yi+NVIVJ+UDsANCGaH bi9yX2E8D82xtSkFydtOmncRyB9jKcYoIBYzLiquKjNWbLVfL6KUHoS+xWd/Z3cbV0qwV3tJbhp1P PVe60dVsxzN6voiyU/0ngHTA9y/rv5O8c2obHaYOxuUj/Z4ctOjIxmAIgR9tQYGASYZvH5Y3a4e3G it3WPu8yP6QWlg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCfgs-0006GB-Pg; Fri, 23 Jun 2023 08:15:04 -0400 In-Reply-To: <86edm2jtih.fsf@gnu.org> (message from Arash Esbati on Fri, 23 Jun 2023 13:41:10 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263953 Archived-At: > From: Arash Esbati > Cc: Andrea Corallo , cyril.arnould@outlook.com, > 63365@debbugs.gnu.org, svraka.andras@gmail.com > Date: Fri, 23 Jun 2023 13:41:10 +0200 > > I'm not tracking 29 branch closely, but from my brief testing: > > • Emacs builds when running > $ ./configure --with-native-compilation && make > on the pretest tarball from > https://alpha.gnu.org/gnu/emacs/pretest/emacs-29.0.92.tar.xz > > • Emacs doesn't build out of local git repo when running > $ git switch emacs-29 > $ git clean -fdx > $ ./autogen.sh > $ ./configure --with-native-compilation && make This might mean that the problem happens when byte-compiling *.el files -- in the tarball all the *.elc files are already present. What happens if you remove the *.elc files from the release tarball, and then try building it? > > Also, why are you using -O3? That is not recommended when building > > Emacs. > > I wasn't aware of that. Can you elaborate why -O3 isn't recommended? In a nutshell, it bloats the code (due to excessive inlining), with no real effect on speed. The inner loops in Emacs are very large, and thus the techniques used by -O3 to speed up code (loop unrolling etc.) don't really work. Moreover, they could make things worse because the larger loops might no longer fit into the L1 cache of the CPU. The -O3 is well suited to speed up relatively simple algorithms with tight loops. Emacs has very few of those, in the places that matter for observable performance.