AJ wrote:Have you read OS Specific Toolchain? Its worth it if you are considering porting GCC.
I'm glad you said that, I was thinking I'd have to promote myself again
The tutorial linked to will get you as far as creating a cygwin/linux
hosted gcc/binutils/newlib that targets your os. Once you have that, you'd need to then use that toolchain to create native apps that actually run on your os. Of course one of these could be gcc, which in theory should compile and run with any standard c library (and you'll have just compiled newlib). Therefore, once you have finished the tutorial, using the same (modified) sources, you should be able to do something like
Code: Select all
../binutils/configure --target=i586-pc-myos --host=i586-pc-myos
and similarly for gcc. You'd need to make sure i586-pc-myos-gcc/as/ld etc are somewhere in your cygwin/linux $PATH. Obviously specify a different prefix to install the myos hosted apps in, then copy to whatever filesystem your os uses. This isn't in the wiki because I haven't verified that it works. Once you have that, all you need is an os that can load and execute programs and supports all the necessary syscalls.
Regards,
John.