Patch by David Forsythe to build lldb on FreeBSD!

I did not take the patch for ClangExpressionParser.cpp since there was a
recent change by Peter for the same line.  Feel free to disagree. :-)

Reference:
----------------------------------------------------------------------
r136580 | pcc | 2011-07-30 15:42:24 -0700 (Sat, 30 Jul 2011) | 3 lines

Add reloc arg to standard JIT createJIT()

Fixes non-__APPLE__ build.  Patch by Matt Johnson!
----------------------------------------------------------------------

Also, I ignore the part of the patch to remove the RegisterContextDarwin*.h/.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136720 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Makefile b/lib/Makefile
index a13114b..9860540 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -73,7 +73,8 @@
               lldbPluginObjectContainerUniversalMachO.a \
               lldbPluginObjectFileMachO.a \
               lldbPluginSymbolVendorMacOSX.a \
-              lldbPluginPlatformMacOSX.a
+              lldbPluginPlatformMacOSX.a \
+			  lldbPluginProcessDarwin
 endif
 
 ifeq ($(HOST_OS),Linux)
@@ -83,6 +84,11 @@
               lldbHostLinux.a
 endif
 
+ifeq ($(HOST_OS),FreeBSD)
+  USEDLIBS += lldbHostFreeBSD.a \
+			  lldbPluginPlatformFreeBSD.a
+endif
+
 include $(LEVEL)/Makefile.common
 
 ifeq ($(HOST_OS),Darwin)
@@ -108,7 +114,7 @@
     endif
 endif
 
-ifeq ($(HOST_OS), Linux)
+ifeq ($(HOST_OS),Linux)
     # Include everything from the .a's into the shared library.
     ProjLibsOptions := -Wl,--whole-archive $(ProjLibsOptions) \
                        -Wl,--no-whole-archive
@@ -117,3 +123,13 @@
     # Link in python
     LD.Flags += $(PYTHON_BUILD_FLAGS) -lrt
 endif
+
+ifeq ($(HOST_OS),FreeBSD)
+    # Include everything from the .a's into the shared library.
+    ProjLibsOptions := -Wl,--whole-archive $(ProjLibsOptions) \
+                       -Wl,--no-whole-archive
+    # Don't allow unresolved symbols.
+    LLVMLibsOptions += -Wl,--no-undefined
+    # Link in python
+    LD.Flags += $(PYTHON_BUILD_FLAGS) -lrt -L/usr/local/lib -lexecinfo
+endif