I'm contemplating using Clang for my hobby OS project called
"wkernel". I want to add a new target i686-pc-wkernel. Later I want to
support x86-64 and ARMv7. Is there any documentation on how to add a
target like this? What is the state of the Universal Driver Project?
When grepping for "freebsd" or "openbsd" it seems I need to add my
target to the following files:
... and maybe:
It could be nice to add a target by just creating a target
configuration file (with everything in one file), maybe using plain
text files or tablegen. My guess is that many targets are similar in
different aspects, so some form of inheritance or include mechanism
should be available.
I built the gold linker (as cross-compiler) from Binutils for my
target. It required few changes since my target is similar to
i686-pc-elf. On the other hand there might be more to it with Clang
since I'm creating my own C library using building blocks from PDCLIB
0.5 and hopefully I'll be using libc++ in the future. Where does a
cross-compiler look for header files and libraries compared to
compiling for the native target?