Roman wrote:http://clang.llvm.org/docs/CrossCompilation.html - this is very useful. I've just used the -target flag and -ffreestanding, as I remember.
I used the same flags (and stuff like -nostdlib), but it seems like there are some bugs in Clang on Linux. I'll try and figure out the problem.
IMO the bare bones should provide instructions on how to compile with both. I like Brendan's idea of branching wiki pages. The whole Bare Bones is kind of in need of a rewrite, TBH. The learning curve ("copy-pasting this fully functional bare bones program" to getting past the x86 housekeeping tasks and actually writing a kernel) is pretty insane. It shouldn't hold your hand as much as it does in the beginning, but it shouldn't just leave you without any guidance at all like it does when you're done. Code snippets are fine, as far as I'm concerned, especially for the aforementioned x86-centric tasks, but I say we smooth out the learning curve a little. More focus on x86_64 would be nice as well, because, let's face it, we live in a 64-bit world.
The whole beginner tutorial path would look something like this:
A slightly less pre-chewed, branched C Bare Bones -> A page explaining the basics and some of the quirks of x86 -> (OPTIONAL: Bare Bones, but for x86_64 ->) A less confusing and more in-depth tutorial on interrupts (and maybe keyboard input) for both GCC (asm goto) and Clang (naked functions), but not a complete, working program. -> (OPTIONAL: An in-depth Paging tutorial ->) A concise (and less messy) tutorial on memory management, but this time without any working code, only algorithms and pseudocode -> Micro- vs Monolithic kernels -> (OPTIONAL: A bootloader tutorial ->) The current "What Order Should I Make Things In" page
After that, we should start thinking about things like File Systems, Processes, VGA, Drivers, USB, stuff like that.
The reason everyone and their mother keeps asking about interrupts is because they're messy AF on x86 (well, everything is messy on x86, but that's not my point). I'm not saying we should dumb down the current instructions, I'm just saying we should make them clearer. A year ago, I would've greatly appreciated a page that explained a lot of the quirks of x86, because reading the manual is a pretty traumatizing experience for a beginner.
TL;DR
We shouldn't dumb down the current instructions, but we should make them clearer and more up-to-date. We shouldn't remove all incorrect or messy info, but improve it and reorder the pages in a way that's less confusing to beginners.