[lldb-dev] LLDB @ Mac OSX: build on Snow Leopard (still) supported? [patch]

Jason Molenda jmolenda at apple.com
Wed Feb 5 14:22:41 PST 2014

On Feb 5, 2014, at 1:35 PM, Bjoern Kahl <mls at bjoern-kahl.de> wrote:

> Well, I am still on Snow Leopard, and I intent to stay there for the
> foreseeable future. :-)

:) I think it's worth distinguishing between Snow Leopard build issues (e.g. the patch you attached) and issues of building a Mac OS X native lldb with a non-clang compiler like gcc 4.8 & the GNU libstdc++.  The last gcc release that Apple had (with Objective-C++ support) was 4.2.1 or so - which obviously won't work for lldb because of the C++11 use in the codebase.

> Actually, after a lot of tries, I succeeded to build current-lldb with
> only minimal changes to its source.  I had to touch only four files
> (patch attached, but needs additional configure test):
> lib/Makefile                     :  added -lpanel
> source/Host/common/FileSpec.cpp  :  added missing #include <limits.h>
> source/Host/common/Host.cpp      :  worked around pthread_fchdir()
> source/Host/macosx/Host.mm       :  worked around pthread_fchdir()
> That's all for LLDB.

Where did you define CONFIG_HAS_PTHREAD_CHDIR for your build?  It might be easier to add something like

#if defined(__APPLE)
#include <AvailabilityMacros.h>
// __pthread_chdir and __pthread_fchdir are only available on Mac OS X 10.7 and later

to common/Host.cpp.

More information about the lldb-dev mailing list