initial OpenBSD toolchain

Initial OpenBSD toolchain modelled after the FreeBSD one
with several changes. Lightly tested with static/dynamic
binaries on i386 and amd64.

Defines required things like __OpenBSD__ which lets a kernel
compile/link.

Several additional attributes such as __bounded__, __sentinel__
and warnings/semantics as described in
http://www.openbsd.org/cgi-bin/man.cgi?query=gcc-local&format=html
are highly desirable as well, but are not included for now.

This diff requires the llvm Triple changes comitted earlier today
to build.

obsd_toolchain.diff (14.2 KB)

Applied here:
  http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090629/018618.html

Thanks!

One question on the patch though, is it really true that gcc always defines
  __KPRINTF_ATTRIBUTE__
on OpenBSD?

- Daniel

No, that shouldn't have been included, while we use a kprintf format
attribute, __KPRINTF_ATTRIBUTE__ isn't defined by gcc.

Additionally it seems -x assembler-with-cpp doesn't generate
assembly that gas will accept when compiling locore.o.
This appears to be due to the lack of something like gcc's
-traditional-cpp flag.

We don't support "traditional" style preprocessing. This is the really old K&R style, it would be best to update to C89 if possible. It's only 20 years old now :slight_smile:

-Chris

No, that shouldn't have been included, while we use a kprintf format
attribute, __KPRINTF_ATTRIBUTE__ isn't defined by gcc.

Ok, I removed it.

- Daniel