Which compiler must I use to create ?:
1. Bare metal utilities.
2. My Operating System.

I think you can use any compiler which has the ability modify the linker, GNU's compiler has linker scripts which controls this important aspect.

Well first you have to identify which platform this OS will run on and then you have to brush up on that platform's assembler code.

I think you can use any compiler which has the ability modify the linker, GNU's compiler has linker scripts which controls this important aspect.

No, no, no, no, don't make that assumption. Unfortunately, it's more complicated than that. A toolchain is compiled to handle the quirks and twists of the target platform. Sure, there are a few flags you feed to GCC, but even then, the general trend is a failing compile.
The guys over at OSDev.org have long known this and long tried to teach it. If you've ever been on the forums, you'll know you should compile a GCC Cross Compiler, which has been set up from the start to compile for striaght i586 ELF without a libc or whatever your target is. Read through Building a GCC Cross Compiler. I'm sure Schol-R-Lea and a few others can vouch for this method. I tried to make do with my system's toolchain, but was eventually talked around to compiling a cross compiler, and haven't looked back. It is the way to go if you're serious about it at all.

On the other hand, if you're using straight ASM, you might be okay, but this is the C forum.

This article has been dead for over six months. Start a new discussion instead.