Page 1 of 1

Operating Systems Kernel Compilation

Posted: Tue Mar 18, 2003 12:00 am
by Nima
What's the best compiler I can use to compile my kernel code which I want to write using C and Assembly?  Thank you whoever you are.

RE:Operating Systems Kernel Compilation

Posted: Thu Mar 20, 2003 12:00 am
by ka3r
If you are using a Linux system, the best are GCC for the C source code, and NASM for the assembly one.

RE:Operating Systems Kernel Compilation

Posted: Thu Mar 20, 2003 12:00 am
by carbonBased
*best* is pretty relative :)

If you're looking for quality compilers, assemblers that are in wide use and available freely on the net, then gcc and nasm are probably your best bet.

Personally, I use gcc for compiling my kernel, but for modules (and eventually the kernel as well) I use lcc 3.6, simply because it's smaller, easier to modify (I've modified LCC to reflect the building environment for my new OS, and to produce rdoff objects).  I'm also using nasm for all the assembly language (and LCC backend).

In time, I'd also like to rewrite the kernel in my own language (www.neuraldk.org/inCode.html) with nasm as a backend.  Personally, I think this is the *best* approach because, of course, I know exactly how the compiler works, and can add features (easily) as needed.

Cheers,
Jeff