[lldb-dev] Pre-processor definition confusion

Zachary Turner zturner at google.com
Thu Sep 11 19:07:54 PDT 2014


Thanks.  In some places we check __GLIBC__ explicitly.  I guess what I'm
wondering is: is there some reason this isn't equivalent to some
combination of OS define checks?


On Thu, Sep 11, 2014 at 4:17 PM, Ed Maste <emaste at freebsd.org> wrote:

> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140911/ee92db33/attachment.html>


More information about the lldb-dev mailing list