On Tue, 2026-05-12 at 18:16 -0400, David Malcolm wrote: > On Tue, 2026-05-12 at 23:54 +0200, Basile STARYNKEVITCH wrote: > > Hello all, > > > > > > I am getting strange message with libgccjit. > > > > You could look at the code in commit 76fa0e724496 of > > https://github.com/RefPerSys/RefPerSys (a GPL licensed inference > > engine > > in C++, work in progress). > > > > The issue is described in https://github.com/RefPerSys/RefPerSys > > You didn't give the issue number, but I'm assuming you're referring > to > https://github.com/RefPerSys/RefPerSys/issues/36 > > The log shows > > libgccjit.so: error: argument to ‘-O’ should be a non-negative > integer, > ‘g’, ‘s’, ‘z’ or ‘fast’ > > Looks like: > gcc_jit_context_add_command_line_option(ctxt, "-O1 -g -fPIC - > Wall"); > is wrong; rather than one call you should call it 4 times, once for > each option: > gcc_jit_context_add_command_line_option(ctxt, "-O1"); > gcc_jit_context_add_command_line_option(ctxt, "-g"); > etc. > > Does that fix the problem?
Yes, and I suggest improving the libgccjit documentation by mentioning it (I mean both calls to gcc_jit_context_add_command_line_option above) as an example. -- Basile STARYNKEVITCH <[email protected]> 8 rue de la Faïencerie http://starynkevitch.net/Basile/ 92340 Bourg-la-Reine https://github.com/bstarynk France https://github.com/RefPerSys/RefPerSys https://orcid.org/0000-0003-0908-5250
