Subject: Re: bug#46495: 28.0.50; [native-comp] Build fails for 32bit --with-wide-int

From: Andrea Corallo <[email-masked]>
Date: Fri, 19 Feb 2021 14:19:48 +0000

Andy Moreton <[email-masked]> writes:

> On Wed 17 Feb 2021, Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
>
>> Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
>> text editors" <[email-masked]> writes:
>>
>>> Andy Moreton <[email-masked]> writes:
>>>
>>>> On Tue 16 Feb 2021, Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
>>>>
>>>>> Andy could you point out the two libgccjit versions you used specifying
>>>>> wich one was used in the successfull / failed experiment?
>>>>
>>>> It seems they both now fail (and I have lost the build log from the
>>>> successful experiment, so I don't have a note of the commit used).
>>>
>>> That's odd.  The culprit of the bug I've isolated is a crash in
>>> libgccjit so should be easy to recognize (we should never crash in
>>> libgccjit).
>>>
>>> Anyway I've an half cooked patch to work around this issue, I guess I'll
>>> test it this evening.
>>
>> A fix like the attached is working around the GCC bug.
>>
>> The only annoyance of this approach is that libgccjit for each
>> compilation is outputting to console:
>> "libgccjit.so: note: disable pass tree-isolate-paths for functions in the range of [0, 4294967295]"
>>
>> We probably also want to check at configure time and raise an error in
>> case configuring --with-nativecomp --with-wide-int but with a (really)
>> old libgccjit that does not provide
>> 'gcc_jit_context_add_command_line_option'.
>>
>> Works for me bootstraping Emacs on i686-pc-linux-gnu + GCC10 but I can't
>> test the Windows side, Andy would you mind giving it a try?
>
> I tried doing clean builds (after "git clean -xdf" each time ) both
> without and then with this patch. The i686-pc-mingw32 toolchain is:
>    gcc version 9.2.0 (MinGW.org GCC Build-2).

The patch is not affecting GCC9 as initially was reported to be working.
If you suspect also 9 is affected you can trivially modify the patch to
take effect on 9 too.

  Andrea