From: "Nicolas Bértolo" <nicolasbertolo@gmail.com>
To: JonY <10walls@gmail.com>
Cc: David Malcolm <dmalcolm@redhat.com>,
jit@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Port libgccjit to Windows.
Date: Sun, 7 Jun 2020 13:03:32 -0300 [thread overview]
Message-ID: <CAFnS-Ony4DVXs4ctHpnxhwi-J_ku6oxHsen6Ek9A=F0BQc13OA@mail.gmail.com> (raw)
In-Reply-To: <01bd8894-78f7-47b4-1a38-e062d549450b@gmail.com>
Hi,
Sorry for the super late reply.
> 1. Using .so on Windows for DLLs is fine.
I know, but using the standard suffix for the platform seems better, IMHO.
> 2. The DLL name on Windows should use LIBGCCJIT_SONAME rather than
> LIBGCCJIT_LINKER_NAME, so applications would load libgccjit.so.0 instead
> of libgccjit.so directly. The linker command output needs to be
> LIBGCCJIT_SONAME.
Do you think the library should be called libgccjit.so.0 instead of the more
Windows-like libgccjit.dll? That seems weird. Could you explain why?
Thanks, Nicolas.
El mar., 2 jun. 2020 a las 13:27, JonY (<10walls@gmail.com>) escribió:
>
> On 5/28/20 8:46 PM, David Malcolm via Gcc-patches wrote:
> > On Thu, 2020-05-28 at 16:51 -0300, Nicolas Bértolo wrote:
> >>> I'm going to have to trust your Windows expertise here; the tempdir
> >>> code looks convoluted to me, but perhaps that's the only way to do
> >> it.
> >>> (Microsoft's docs for "SECURITY_ATTRIBUTES" suggest to me that if
> >>> lpSecurityDescriptor is NULL, then the directory gets a default
> >>> security descriptor, and that this may mean it's only readable by
> >> the
> >>> user represented by the access token of the process [1], which
> >> might
> >>> suggest a simplification - but I'm very hazy on how the security
> >> model
> >>> in Windows works)
> >>
> >> I tested this and it gives write access to the "Authenticated Users"
> >> group.
> >
> > Aha - sounds like that would be a problem. Thanks for clarifying.
> >
> >> The
> >> way I did it gives access only to the user that owns the libgccjit
> >> process. I
> >> have to admit that it is a lot of code and it is hard to understand
> >> unless you
> >> know the security model of Windows well. I don't know it well, I
> >> wrote this
> >> keeping the documentation close and experimenting.
> >
> > Thanks.
> >
> >>> I was able to successfully bootstrap and regression test with your
> >>> patch on x86_64-pc-linux-gnu. I also verified that the result of
> >> "make
> >>> install" was not affected for my configuration.
> >>
> >> Great.
> >>
> >>> I've pushed your patch to master as
> >>> c83027f32d9cca84959c7d6a1e519a0129731501.
> >>>
> >>> Thanks again for the patch
> >>> Dave
> >>
> >> Thanks to you for all the good feedback.
> >>
> >> Nico.
> >
>
> Hello,
>
> A bit of a late review, some minor points:
>
> 1. Using .so on Windows for DLLs is fine.
> 2. The DLL name on Windows should use LIBGCCJIT_SONAME rather than
> LIBGCCJIT_LINKER_NAME, so applications would load libgccjit.so.0 instead
> of libgccjit.so directly. The linker command output needs to be
> LIBGCCJIT_SONAME.
> 3. Ideally I would prefer to .cc too, though I see other C++ files also
> written as .c.
>
> Resend in case reply to list did not work,
>
next prev parent reply other threads:[~2020-06-07 16:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-24 20:02 Nicolas Bértolo
2020-05-24 20:48 ` David Malcolm
2020-05-25 19:48 ` Nicolas Bértolo
2020-05-26 18:40 ` David Malcolm
2020-05-28 1:27 ` Nicolas Bértolo
2020-05-28 19:00 ` David Malcolm
2020-05-28 19:51 ` Nicolas Bértolo
2020-05-28 20:46 ` David Malcolm
2020-06-02 16:26 ` JonY
2020-06-07 16:03 ` Nicolas Bértolo [this message]
2020-06-08 2:11 ` JonY
2020-06-11 22:02 ` Nicolas Bértolo
2020-06-12 0:19 ` JonY
2020-06-16 0:12 ` JonY
2020-06-16 0:15 ` Nicolas Bértolo
2020-05-29 14:48 ` NightStrike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFnS-Ony4DVXs4ctHpnxhwi-J_ku6oxHsen6Ek9A=F0BQc13OA@mail.gmail.com' \
--to=nicolasbertolo@gmail.com \
--cc=10walls@gmail.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jit@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).