LibGCCJIT 13.x possible in Amiga library?

Online Status

https://gcc.gnu.org/onlinedocs/gcc-13.2.0/jit/ GCC has a generic optimizer and backend for generating machine code. I'd like to know if it would be possible to implement the GCC JIT wrapper as a shared library so it would be easier to implement in other compiler frontends like EEC (AmigaE) and other popular programming languages?

Online Status

The pure c library could definitely be made into an amiga shared library

Would take a bit of work - but is not super difficult

Obviously all functions need to be reentrant - I've not checked that but would assume so

Online Status

Ok, great. We'll see how my schedule turns out.

Online Status

I think this guide for shared libraries can be useful

https://amigadev.elowar.com/read/ADCD_2.1/AmigaMail_Vol2_guide/node008C…

Online Status

It will give you an overview - unfortunately there are many pitfalls

You can also steal startup.c from https://gitlab.com/boemann/codeindex

While that project is lgpl that file basically is public domain, as it is about the simplest boiler plate you can do

Online Status

If I do get around to making this, it'll most likely be using Bebbo's GCC 6.5b port so I can cross-compile from Linux or MorphOS. I don't own a license to SAS/C but it's good to see the semaphore protected startup spinlock is accessible to it nonetheless.

Online Status

I think that .c file will compile under gcc without issue

The entire codeindex project is not compilable by anyone but me at the moment as it relies on some stuff that is not yet published