Index: lldb/trunk/scripts/Python/modules/Makefile
===================================================================
--- lldb/trunk/scripts/Python/modules/Makefile
+++ lldb/trunk/scripts/Python/modules/Makefile
@@ -12,8 +12,8 @@
 
 DIRS:=
 
-# only build the readline suppression module on Linux
-ifeq ($(HOST_OS), Linux)
+# only build the readline suppression module on Linux, Kfreebsd & Hurd
+ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD))
 DIRS += readline
 endif
 
Index: lldb/trunk/source/Host/common/Host.cpp
===================================================================
--- lldb/trunk/source/Host/common/Host.cpp
+++ lldb/trunk/source/Host/common/Host.cpp
@@ -1054,7 +1054,7 @@
 
 #endif
 
-#if !defined (__linux__) && !defined (__FreeBSD__) && !defined (__NetBSD__)
+#if !defined (__linux__) && !defined (__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined (__NetBSD__)
 
 const lldb_private::UnixSignalsSP&
 Host::GetUnixSignals ()
Index: lldb/trunk/source/Host/freebsd/HostThreadFreeBSD.cpp
===================================================================
--- lldb/trunk/source/Host/freebsd/HostThreadFreeBSD.cpp
+++ lldb/trunk/source/Host/freebsd/HostThreadFreeBSD.cpp
@@ -14,7 +14,9 @@
 // C includes
 #include <errno.h>
 #include <pthread.h>
+#if defined (__FreeBSD__)
 #include <pthread_np.h>
+#endif
 #include <stdlib.h>
 #include <sys/sysctl.h>
 #include <sys/user.h>
Index: lldb/trunk/source/Host/freebsd/ThisThread.cpp
===================================================================
--- lldb/trunk/source/Host/freebsd/ThisThread.cpp
+++ lldb/trunk/source/Host/freebsd/ThisThread.cpp
@@ -13,18 +13,27 @@
 #include "llvm/ADT/SmallVector.h"
 
 #include <pthread.h>
+#if defined (__FreeBSD__)
 #include <pthread_np.h>
+#endif
 
 using namespace lldb_private;
 
 void
 ThisThread::SetName(llvm::StringRef name)
 {
+#if defined (__FreeBSD__) // Kfreebsd does not have a simple alternative
     ::pthread_set_name_np(::pthread_self(), name.data());
+#endif
 }
 
 void
 ThisThread::GetName(llvm::SmallVectorImpl<char> &name)
 {
+#if defined (__FreeBSD__)
     HostNativeThread::GetName(::pthread_getthreadid_np(), name);
+#else
+// Kfreebsd
+    HostNativeThread::GetName((unsigned)pthread_self(), name);
+#endif
 }
Index: lldb/trunk/tools/lldb-mi/MICmnLogMediumFile.cpp
===================================================================
--- lldb/trunk/tools/lldb-mi/MICmnLogMediumFile.cpp
+++ lldb/trunk/tools/lldb-mi/MICmnLogMediumFile.cpp
@@ -24,7 +24,7 @@
 #include "MICmnResources.h"
 #if defined(_MSC_VER)
 #include "MIUtilSystemWindows.h"
-#elif defined(__FreeBSD__) || defined(__linux__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__linux__)
 #include "MIUtilSystemLinux.h"
 #elif defined(__APPLE__)
 #include "MIUtilSystemOsx.h"
Index: lldb/trunk/tools/lldb-mi/MIUtilSystemLinux.h
===================================================================
--- lldb/trunk/tools/lldb-mi/MIUtilSystemLinux.h
+++ lldb/trunk/tools/lldb-mi/MIUtilSystemLinux.h
@@ -21,7 +21,7 @@
 
 #pragma once
 
-#if defined(__FreeBSD__) || defined(__linux__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__linux__)
 
 // In-house headers:
 #include "MIUtilString.h"
Index: lldb/trunk/tools/lldb-mi/MIUtilSystemLinux.cpp
===================================================================
--- lldb/trunk/tools/lldb-mi/MIUtilSystemLinux.cpp
+++ lldb/trunk/tools/lldb-mi/MIUtilSystemLinux.cpp
@@ -19,7 +19,7 @@
 // Copyright:   None.
 //--
 
-#if defined(__FreeBSD__) || defined(__linux__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__linux__)
 
 // In-house headers:
 #include "MIUtilSystemLinux.h"