Re: [PATCH][gcc] libgccjit: introduce version entry points

2020-03-08 Thread Andrea Corallo
Hi, thanks for reviewing, I've totally missed this multi-thread aspect. David Malcolm writes: > On Thu, 2020-03-05 at 21:34 -0500, David Malcolm wrote: >> On Thu, 2020-01-16 at 11:11 +, Andrea Corallo wrote: > > Responding to my own ideas about thread-safety. > > [...] > >> My first thought

Re: [PATCH][gcc] libgccjit: introduce version entry points

2020-03-06 Thread David Malcolm
On Thu, 2020-03-05 at 21:34 -0500, David Malcolm wrote: > On Thu, 2020-01-16 at 11:11 +, Andrea Corallo wrote: Responding to my own ideas about thread-safety. [...] > My first thought here was that we should have a way to get all three > at > once, but it turns out that parse_basever does it

Re: [PATCH][gcc] libgccjit: introduce version entry points

2020-03-06 Thread Andrea Corallo
David Malcolm writes: > On Thu, 2020-01-16 at 11:11 +, Andrea Corallo wrote: >> Hi, second version of the patch here cleaning up an unnecessary >> change. >> >> Does not introduce regressions with make check-jit. >> >> Andrea >> >> gcc/jit/ChangeLog >> 2020-??-?? Andrea Corallo >> >>

Re: [PATCH][gcc] libgccjit: introduce version entry points

2020-03-06 Thread Florian Weimer
* David Malcolm: > > My first thought here was that we should have a way to get all three at > once, but it turns out that parse_basever does its own caching > internally. > > I don't think the current implementation is thread-safe; parse_basever > has: > > static int s_major = -1, s_minor, s_pa

Re: [PATCH][gcc] libgccjit: introduce version entry points

2020-03-05 Thread David Malcolm
On Thu, 2020-01-16 at 11:11 +, Andrea Corallo wrote: > Hi, second version of the patch here cleaning up an unnecessary > change. > > Does not introduce regressions with make check-jit. > > Andrea > > gcc/jit/ChangeLog > 2020-??-?? Andrea Corallo > > * docs/topics/compatibility.rst

Re: [PATCH][gcc] libgccjit: introduce version entry points

2020-01-16 Thread Andrea Corallo
Hi, second version of the patch here cleaning up an unnecessary change. Does not introduce regressions with make check-jit. Andrea gcc/jit/ChangeLog 2020-??-?? Andrea Corallo * docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag plus add version paragraph. *

[PATCH][gcc] libgccjit: introduce version entry points

2020-01-15 Thread Andrea Corallo
Hi all, I think would be quite useful for client code to be able to probe for the libgccjit version. This patch add three entry points for that: gcc_jit_version_major, gcc_jit_version_minor, gcc_jit_version_patchlevel. Does not introduce regressions running make check-jit. Feedback are welcome.