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: Cyril Arnould <cyril.arnould <at> outlook.com>
To: Andrea Corallo <acorallo <at> gnu.org>
Cc: "63365 <at> debbugs.gnu.org" <63365 <at> debbugs.gnu.org>, "eliz <at> gnu.org" <eliz <at> gnu.org>, Arash Esbati <arash <at> gnu.org>, András Svraka <svraka.andras <at> gmail.com>
Subject: bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with native-compilation
Date: Tue, 14 May 2024 21:52:42 +0200
I believe the problem is centered around the mark_threads function (in
thread.c). I still have no idea if the issue is with emacs or GCC, but
I hope this helps narrow it down.

I found it by trying to suppress the sibling call optimization through
printf statements at the end of every function that showed differences
between the objdump files. With the additional printf calls, the
native-compilation build works together with the
-foptimize-sibling-calls flag.

After that, it was just a matter of narrowing it down. You can try it
for yourself with the following patch:

diff --git a/src/thread.c b/src/thread.c
index 040ca39511e..b522d146779 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -696,6 +696,7 @@ mark_threads_callback (void *ignore)
 mark_threads (void)
 {
   flush_stack_call_func (mark_threads_callback, NULL);
+  printf("");
 }

 void

Note that by now I've moved on to emacs-29.3 on GCC 14, however it
seems that the issue is still exactly the same.




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

Previous Next


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