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


View this message in rfc822 format

From: Arash Esbati <arash <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 63365 <at> debbugs.gnu.org, akrl <at> sdf.org
Subject: bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with native-compilation
Date: Fri, 09 Jun 2023 00:27:43 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> If this is not related to native-compilation, my first suspect is GCC
> optimizations.  Try building with -Og or -O1, and see if that avoids
> the problem.

Ok, I tried the different optimization levels and this is the result.  

Running the standard procedure

  $ git clean -fdx
  $ ./autogen.sh
  $ ./configure --with-native-compilation

Gives this in the summary

  What compiler should emacs be built with?  gcc  -g3 -O2 -gdwarf-2

which breaks during the make run.

Lowering the -O option works for these three scenarios and Emacs builds
successfully with GCC 13.1:

  $ git clean -fdx
  $ ./autogen.sh
  $ CFLAGS='-g3 -O0 -gdwarf-2' ./configure --with-native-compilation
  $ make

  $ git clean -fdx
  $ ./autogen.sh
  $ CFLAGS='-g3 -O1 -gdwarf-2' ./configure --with-native-compilation
  $ make

  $ git clean -fdx
  $ ./autogen.sh
  $ CFLAGS='-g3 -Og -gdwarf-2' ./configure --with-native-compilation
  $ make

Best, Arash




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.