I recently switched to Emacs 28.1 hoping to use the new native-comp support. Being on Windows, I followed these instructions to install libgccjit, copying the resulting libgccjit.dll library to Emacs’s bin folder. However, upon doing so, I received the following warning whenever Emacs attempted to compile any file:
Warning (comp): C:\Users\<omitted>\AppData\Local\Temp\\libgccjit-554575/fake.s:4: Error: junk at end of line, first unrecognized character is `"' Disable showing Disable logging
Warning (comp): C:\Users\<omitted>\AppData\Local\Temp\\libgccjit-554575/fake.s:4: Error: file number less than one Disable showing Disable logging
Warning (comp): c:\emacs\bin\libgccjit-0.dll: error: error invoking gcc driver Disable showing Disable logging
Warning (comp): <filename>: Error: Internal native compiler error failed to compile Disable showing Disable logging
(Where <filename> is the name of each file Emacs attempted to compile, of course.)
Curiously, when I launch Emacs from MSYS2 MinGW (64-bit), the errors disappear, and Emacs is successfully able to compile all files. What is going on here, and how may I fix it? All I know at this point is that the problem is probably unrelated to the dependencies to libgccjit.dll: using dumpbin libgccjit.dll /dependents revealed that Emacs’s bin folder already contains all dependencies of libgccjit.dll.