Libgccjit.so?

I’ve been looking at libgccjit.so on Linux as a backend for compilers whose licensing might not be compatible with a normal GCC frontend. Contrary to the name, libgccjit can be used for AOT compilers as well as JITs. Its API is C-based but has a C++ wrapper. I’m hoping to avoid C++isms associated with LLVM-JIT. It didn’t show up in a HaikuPorts search. Would it be easy to add?

I guess I’ll cross that bridge as I come to it. Linux first, then port from there.

You should

  • clone the HaikuPort repo
  • study the GCC recipe and build it to get practice
  • enable libgccjit in the configure invocation
  • build locally
  • compare the generated package with the current gcc package in the repository and identify the new files. Those should be the libgccjit related files.
  • split the libgccjit related files into an own subpackage, see the fortran subpackage for example how to do it.
  • rebuild it again and again til lyou confirm the recipe and the generated packages works
  • bump the recipe REVISION
  • create a PR.

Trivial.

6 Likes

Thanks! Just what I needed to know.