So I'm going to attempt making my first OS (Yay me!) and I'd like to just run it in QEMU using Nasm as my assembler and Clang as my compiler.
But the default (on Ubuntu) is GAS/GCC for make.
So, uh, do I just put .clang on the end of the makefile or something? Do some shell script edits? I'm assuming the latter, since there's an assembler involved, not just a compiler. *goes to search for shell scripts while I wait for a response*
Clang + Nasm on Ubuntu?
Re: Clang + Nasm on Ubuntu?
You just need to set the standard make variables CC, CXX, and AS to point to the appropriate programs. Using nasm could be problematic and will probably need a little more work as the compiler will be emitting assembler code targetted at the standard GNU assembler. Personally I would make life easier and stick withthe GNU assembler.
This is not really a question about OS development, but about how to use the toolset. Practice with simple programs until you are confident that you know how to use the tools - compiler, assembler, linker, library utilities - before progressing to the more ambitious stuff.
This is not really a question about OS development, but about how to use the toolset. Practice with simple programs until you are confident that you know how to use the tools - compiler, assembler, linker, library utilities - before progressing to the more ambitious stuff.
-
- Posts: 2
- Joined: Thu Aug 02, 2012 12:40 am
Re: Clang + Nasm on Ubuntu?
Yeah, I'm going to be doing that for practice for awhile. And reading more documentation.iansjack wrote:This is not really a question about OS development, but about how to use the toolset. Practice with simple programs until you are confident that you know how to use the tools - compiler, assembler, linker, library utilities - before progressing to the more ambitious stuff.