GNU bug report logs -
#63365
30.0.50; GCC 13.1 breaks building Emacs with native-compilation
Previous Next
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
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Arash Esbati <arash <at> gnu.org>
>> Cc: 63365 <at> debbugs.gnu.org, akrl <at> sdf.org
>> Date: Thu, 08 Jun 2023 12:21:11 +0200
>>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> > Did you say that the problem goes away if you configure without
>> > native-compilation?
>>
>> Yes, no problems when --without-native-compilation is passed to
>> configure.
>>
>> > If so, let's wait for Andrea to fix the problems with that on master,
>> > and try again.
>>
>> I tried the latest master (a902156068), and the issue remains.
>>
>> > Or did you also see similar problems on the emacs-29 branch?
>>
>> Yes, issue remains with 0eba9cf651.
>
> Andrea, can you suggest some ideas for what to try/test, or
> alternatively how to prepare a concise test/reproducer for the GCC
> folks? AFAIU, GCC 13.1 does work on GNU/Linux
I'm giving it a try mow to be sure.
> to produce a working
> Emacs with native-compilation, so this is probably Windows-specific.
I'd personally start producing an Emacs made only of bytecode but with
native compiler capabilies. To achieve this one can hack the Makefile
removing the native code specific parts, something like the very much
untested attached.
[build-hack.diff (text/x-diff, inline)]
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 1e0935f565f..635dd7d1450 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -278,23 +278,9 @@ TAGS:
THEFILE = no-such-file
.PHONY: $(THEFILE)c
$(THEFILE)c:
-ifeq ($(HAVE_NATIVE_COMP),yes)
- $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \
- -l comp -f byte-compile-refresh-preloaded \
- -f batch-byte+native-compile $(THEFILE)
-else
$(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \
-l bytecomp -f byte-compile-refresh-preloaded \
-f batch-byte-compile $(THEFILE)
-endif
-
-ifeq ($(HAVE_NATIVE_COMP),yes)
-.PHONY: $(THEFILE)n
-$(THEFILE)n:
- $(AM_V_ELN)$(emacs) $(BYTE_COMPILE_FLAGS) \
- -l comp -f byte-compile-refresh-preloaded \
- --eval '(batch-native-compile t)' $(THEFILE)
-endif
# Files MUST be compiled one by one. If we compile several files in a
# row (i.e., in the same instance of Emacs) we can't make sure that
@@ -323,11 +309,6 @@ .el.elc:
-l comp -f batch-byte-compile $<
TZ=UTC0 touch -t 197001010000 $@
else
-.el.elc:
- $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \
- -l comp -f batch-byte+native-compile $<
-endif
-else
.el.elc:
$(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $<
endif
[Message part 3 (text/plain, inline)]
I'd also nil `native-comp-jit-compilation' in the early init.
After that one should still be able to run the native compiler testsuite
with say:
./src/emacs -batch -l ert -l test/src/comp-tests.el -f ert-run-tests-batch-and-exit
We want probably start running first all tests but the bootstrap one and
if they pass run this as well. At this point probably start reasoning
depending on the output.
Best Regards
Andrea
This bug report was last modified 1 year and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.