GNU bug report logs - #63365
30.0.50; GCC 13.1 breaks building Emacs with native-compilation

Previous Next

Package: emacs;

Reported by: Arash Esbati <arash <at> gnu.org>

Date: Mon, 8 May 2023 08:17:02 UTC

Severity: normal

Tags: moreinfo

Merged with 65727

Found in version 30.0.50

Done: Andrea Corallo <acorallo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #149 received at 63365 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Deus Max <deusmax <at> gmx.com>
Cc: 63365 <at> debbugs.gnu.org, arash <at> gnu.org, acorallo <at> gnu.org,
 svraka.andras <at> gmail.com, cyril.arnould <at> outlook.com
Subject: Re: bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with
 native-compilation
Date: Sat, 24 Jun 2023 12:21:31 +0300
> From: Deus Max <deusmax <at> gmx.com>
> Cc: Arash Esbati <arash <at> gnu.org>,  63365 <at> debbugs.gnu.org,  acorallo <at> gnu.org,
>   svraka.andras <at> gmail.com,  cyril.arnould <at> outlook.com
> Date: Sat, 24 Jun 2023 12:17:11 +0300
> 
> On 2023-06-23T15:15 Fri, Eli Zaretskii wrote:
> 
> >> From: Arash Esbati <arash <at> gnu.org>
> >> Cc: Andrea Corallo <acorallo <at> gnu.org>,  cyril.arnould <at> outlook.com,
> >>   63365 <at> debbugs.gnu.org,  svraka.andras <at> gmail.com
> >> Date: Fri, 23 Jun 2023 13:41:10 +0200
> >>
> >> > 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.
> 
> Interesting.
> This recommendation and the explanation are worth documenting somewhere.
> Shouldn't a new bug be opened on documenting the GCC -O3 recommendation?

I don't think it's our business to document this.  The default build
procedure correctly uses -O2.  People who use non-default compilation
switches should know what they are doing.




This bug report was last modified 1 year and 2 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.