[lldb-dev] Pre-processor definition confusion

Ed Maste emaste at freebsd.org
Thu Sep 11 16:17:12 PDT 2014


On 11 September 2014 18:55, Zachary Turner <zturner at google.com> wrote:
> A couple of pre-processor definitions I'm wondering about:
>
> __NetBSD__: What is this used for, and how is it different than __FreeBSD__?

NetBSD is another OS altogether, although has a lot in common with
FreeBSD.  It's well supported in Clang/LLVM.  The few cases in LLDB
represent the beginning of support, but I'm not aware of anyone
building or testing it on a regular basis.

> __FreeBSD_kernel__: Same as previous question, why is this different than
> just __FreeBSD__?

This indicates that the FreeBSD kernel is being used, without
reference to the userland / libc.  It's mainly driven by the Debian
GNU/kFreeBSD project, which runs a GNU userland and GLIBC on the
FreeBSD kernel.  (It's sort of the opposite of Android in that
respect.)  I know they at least build-test LLDB regularly.

__FreeBSD__ implies __FreeBSD_kernel__

> __GLIBC__: Isn't this the same as __linux__ || __APPLE__?

It indicates GNU libc, so not true on Apple.



More information about the lldb-dev mailing list