DISCLAIMER: These notes are from the defunct k8 project which precedes SquirrelJME. The notes for SquirrelJME start on 2016/02/26! The k8 project was effectively a Java SE 8 operating system and as such all of the notes are in the context of that scope. That project is no longer my goal as SquirrelJME is the spiritual successor to it.
Writing my own compiler is nice, however that is going to much work. In order for this all to work I need to be making native code now. A runtime that can load classes and create generators for native code for using on a build system and the actual k8 system itself. So I will need a compiler wrapper system which can execute existing compilers on the disk and look for any nice looking compilers, and if there are none then my compiler could be used instead when it gets to that point. There is already a compiler API in the Java 7 and 8 class library, however on older versions that is not feasible to use. The compiler wrapper could also be used to invoke compilers that exist on the disk and possibly bootstrap my own compiler if possible. As for the runtime system they will all be k8-runtime prefixed then specific architectures would then become k8-runtime-powerpc. The runtime should be capable of compilation and interpretation (when compilation is not available). The runtime system should require Java 8 at least because that is the cleanest.
So my package building setup and the hairboot boot script also changes. It will have to compile the package manager as usual, along with the compiler wrapper. Then once the wrapper is built, it can be used to check if there is in fact a Java 8 compiler available. If there is not, then the script can build my compiler to act as a Java 8 compiler. That would be the simplest solution as it will permit me to skip the writing a compiler step.