Subject: Re: bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with native-compilation

From: Andrea Corallo <[email-masked]>
Date: Thu, 08 Jun 2023 10:39:00 -0400

Eli Zaretskii <[email-masked]> writes:

>> From: Andrea Corallo <[email-masked]>
>> Cc: Arash Esbati <[email-masked]>,  [email-masked]
>> Date: Thu, 08 Jun 2023 10:02:22 -0400
>> 
>> > 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.
>
> Thanks, that'd be good.

I confirm Emacs 29 bootstraps fine native compiled with GCC+libgccjit
13.1 x86_64-pc-linux-gnu here.

>> > 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.
>
> OK, but I thin Arash should try building without -D_FORTIFY_SOURCE=1
> cpp option first.  Because if that works, it then becomes a general
> MinGW GCC problem with using that option, and not something specific
> to Emacs or libgccjit.

Agree.

Thanks

  Andrea