Page 1 of 1
Clang + Nasm on Ubuntu?
Posted: Sun Aug 19, 2012 9:07 pm
by NukeRusich
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*
Re: Clang + Nasm on Ubuntu?
Posted: Mon Aug 20, 2012 12:57 am
by iansjack
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.
Re: Clang + Nasm on Ubuntu?
Posted: Mon Aug 20, 2012 5:16 pm
by NukeRusich
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.
Yeah, I'm going to be doing that for practice for awhile. And reading more documentation.