#41070: Please include libgccjit with MinGW GCC distribution Open Date: 2020-12-23 17:28 Last Update: 2021-01-03 22:05 URL for this Ticket: https://osdn.net//projects/mingw/ticket/41070 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41070 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2021-01-03 22:05 Updated by: keith Comment: With the previously posted series of patches, (20...22), augmenting the pre-existing series for MinGW GCC-9.2.0, the libgccjit shared library sources compile; however, they do not link, because they introduce an unresolved dependency on pthreads mutexes. While it would be technically feasible to include -lpthread within the link operation, and so resolve this dependency, but, as noted in this mailing-list message: The dependency on pthreads is also unfortunate, as that many times conflicts with w32api headers and creates build problems. It would be good to avoid that dependency, if possible. It arises because the JIT context is gratuitously guarded by a POSIX mutex lock. Perhaps that could be converted to a Windows alternative, (critical section, maybe); perhaps GCC-10 already does so, because the patches you pointed me to do nothing to address this. I think MinGW64 simply requires pthreads in all the GCC-related builds, we had our share of problems stemming from that in Emacs development, when MinGW64 users complained about that. It should be very simple to replace a pthreads mutex lock with a critical section, if GCC 10 didn't. the dependency on a third-party pthreads mutex implementation does seem kind of alien, on the Windows platform, when a native alternative would appear to be entirely feasible. FWIW, a cursory examination of the GCC-10 sources suggests that the pthreads mutex dependency is still present, without change. Consequently, while not entirely trivial, I have engineered a relatively simple replacement, in terms of a native Windows CRITICAL_SECTION; it may be found in the attached 23-libgccjit-win32-no-pthreads.patch. --------------------------------------------------------------------- Ticket Status: Reporter: eliz Owner: keith Type: Feature Request Status: Open [Owner assigned] Priority: 5 - Medium MileStone: (None) Component: GCC Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: Please add libgccjit to the binaries included in the MinGW GCC distributions. This is required to be able to build projects that use libgccjit for JIT compilation of code. One example of this is "gccemacs", a branch of GNU Emacs development (soon to land on the master branch of Emacs) that compiles Emacs Lisp programs into native x86 code for faster runtime performance. Thank you. -- Ticket information of MinGW - Minimalist GNU for Windows project MinGW - Minimalist GNU for Windows Project is hosted on OSDN Project URL: https://osdn.net/projects/mingw/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/mingw/ticket/41070 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41070