Send MinGW-Notify mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.osdn.me/mailman/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-Notify digest..."
Please do not reply to this notification; the sender address is unable to
accept incoming e-mail. If you wish to unsubscribe you can do so at
https://lists.osdn.me/mailman/listinfo/mingw-notify.
Today's Topics:
1. [mingw] #41070: Please include libgccjit with MinGW GCC
distribution (MinGW Notification List)
----------------------------------------------------------------------
Message: 1
Date: Wed, 03 Feb 2021 22:31:00 +0000
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #41070: Please include libgccjit with
MinGW GCC distribution
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
#41070: Please include libgccjit with MinGW GCC distribution
Open Date: 2020-12-23 17:28
Last Update: 2021-02-03 22:31
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-02-03 22:31 Updated by: keith
Comment:
Reply To davidmalcolm
Looking at the patches themselves:
27-libgccjit-invalid-assertion.patch(1KB)
- Patch to correct invalid assumption in DIR_SEPARATOR verification assertion
Nicholas completely rewrote this code for Windows as part of
c83027f32d9cca84959c7d6a1e519a0129731501. Sorry again for not realizing it
earlier. I'd appreciate it if you could look over gcc/jit/jit-w32.c in his
patch to see if you know of a better way to securely create a temporary
directory on Windows (or, indeed, if there are other issues).
Sorry, but I simply could not accept Nicolas' gcc/jit/jit-w32.c, for MinGW.
The file, itself, implements two publicly visible functions:
print_last_error()This is basically a reproduction of the technique used by
MinGW, in our implementation of dlerror(), except that print_last_error() dumps
diagnostics directly to stderr, whereas dllerror() stores the diagnostic in a
memory buffer, for subsequent use by the calling program, (in similar fashion
to strerror()). Furthermore, dlerror() guarantees that the diagnostic does not
end with any trailing newline; print_last_error() offers no such
guarantee.Since libgccjit, (without Nicolas' modification), already uses
dlerror(), and MinGW already offers a serviceable implementation thereof, I
fail to see a need for print_last_error().
win_mkdtemp()This substitute for mkdtemp(), (of which, once again, MinGW
already has a perfectly serviceable implementation), presents real issues, from
a MinGW perspective, and is, ultimately, the reason why I must reject this, as
a viable MinGW patch. Specifically:
The function gratuitously calls the Microsoft rand_s() function, to generate a
random portion of the directory name with 10**6 (expressed in FORTRAN
exponentiation syntax) degrees of freedom; this function is unsupported on any
version of Windows, prior to Vista, when linking with MSVCRT.DLL, (as MinGW
must do), but MinGW is committed to supporting earlier versions; the MinGW
implementation of mkdtemp() suffers no such dependency limitation, (since it
uses CryptGenRandom() instead of rand_s(), so is supported by all 32-bit
Windows versions since Win95-OSR2), and additionally, offers 36**6 degrees of
freedom in the generated directory name.
The function gratuitously makes implicit calls to ADVAPI32.DLL functions, for
the purpose of associating a "user-only" ACL with the created temporary
directory. While the called functions should be available in WinNT versions of
ADVAPI32.DLL, they are not available in Win9x versions. Currently, MinGW's
mkdtemp() makes no attempt to assign any such ACL; it could be easily adapted
to do so, (although I am unconvinced of a necessity to do so), but any such
adaptation would be required to use explicit linking, (via LoadLibrary() and
GetProcAddress()), to preserve compatibility with Win9x.
Given the above, when I eventually progress to working from a tarball to which
Nicolas' gcc/jit/jit-w32.c patch has been applied, I will be obliged to revert
it, and persist with my own local patches.
---------------------------------------------------------------------
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:
ease 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
------------------------------
Subject: Digest Footer
_______________________________________________
MinGW-Notify mailing list
[email protected]
https://lists.osdn.me/mailman/listinfo/mingw-notify
------------------------------
End of MinGW-Notify Digest, Vol 41, Issue 4
*******************************************