What should I do and where should I start?
It’s not a question of profit, it’s just for fun. Can OCaml run on the PSP platform for game development or other platforms without a large Unix environment?
What should I do and where should I start?
It’s not a question of profit, it’s just for fun. Can OCaml run on the PSP platform for game development or other platforms without a large Unix environment?
Install the dev environment for the platform, including its C compiler and make and try to compile the compiler from sources.
See where thing breaks, try to fix (possibly stubbing stuff) and continue until it succeeds either building the bytecode compiler or the native code compiler (if the host architecture is supported by upstream).
Also try to disable as much stuff at configuration time as possible, see ./configure --help. If you don’t succeed running the configure you can try to generate it on another similar platform and hand tweak the resulting Makefile.config , runtime/caml/m.h and runtime/caml/s.h files yourself (an old example here)
Note that nowadays you will need an implementation of POSIX threads. That can be eschewed if you use OCaml < 5.
Thanks! Interesting how deep I can configure runtime behavior. ![]()
The runtime system only really needs a couple of libc functions some of which you can stub (because annoyingly stuff keeps on being added to Sys which are not essential to the runtime system).
At the time of 4.02 that was pretty much it. But with with the advent of multicore (>= 5) you will have to provide an implementation for the platform abstraction here (but if your platform has posix threads that won’t be a problem).