Subject: bug#50316: Latest git version doesn't build on Win with MSYS2

From: Arash Esbati <[email-masked]>
Date: Wed, 01 Sep 2021 12:33:37 +0200

Hi all,

I updated my local repo to 2c662e6d66 and after the successful configure
(which enables native compiler), the make process stops with:

  [...]
  CC       image.o
  CC       json.o
  CC       tparam.o
  CC       lastfile.o
  CCLD     temacs.exe
z:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: comp.o:comp.c:(.text+0x199a): undefined reference to `gcc_jit_context_new_cast'
z:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: comp.o:comp.c:(.text+0x19ec): undefined reference to `gcc_jit_context_new_cast'
z:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: comp.o:comp.c:(.text+0x1ae2): undefined reference to `gcc_jit_context_new_cast'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:633: temacs.exe] Error 1

I suspect it is due to commit 6767e55659.  My current working Emacs repo
version is 670b423ebc which built without problems.  This is with gcc
10.3.

Best, Arash