diff --git a/debian/changelog b/debian/changelog index ebd38aef..c5c663ec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,12 @@ -llvm-toolchain-3.3 (1:3.3-3) UNRELEASED; urgency=low +llvm-toolchain-3.3 (1:3.3-3) unstable; urgency=low + [ Luca Falavigna ] * Integrate patch to fix FTBFS under IA64. - * Integrate patch to fix FTBFS under kFreeBSD. - -- Luca Falavigna Mon, 24 Jun 2013 09:03:57 +0200 + [ Luca Falavigna & Robert Millan ] + * Integrate patch to fix FTBFS under kFreeBSD (Closes: #714098) + + -- Sylvestre Ledru Mon, 01 Jul 2013 09:29:02 +0200 llvm-toolchain-3.3 (1:3.3-2) unstable; urgency=low @@ -13,6 +16,9 @@ llvm-toolchain-3.3 (1:3.3-2) unstable; urgency=low * Move libjs-jquery & libjs-underscore dependencies to llvm-X.Y-doc * Add lldb-X.Y manpage * Hopefully fix the ftbfs under mipsel (mipsel-ftbfs.diff) + * Disable the usage of binutils-gold under armel. It currently fails with: + "attempt to map 2752512 bytes at offset 2066666 exceeds size of file; + the file may be corrupt" [ Léo Cavaillé ] * Add patch to find correctly LLVMGold.so with -O4 (Closes: #712437) diff --git a/debian/control b/debian/control index 293dd92c..4dbe2e48 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl8.5, expect, lsb-release, patchutils, diffstat, xz-utils, chrpath, python-dev, libedit-dev, swig, python-sphinx, ocaml-nox, binutils-dev, libcloog-isl-dev, libisl-dev (>= 0.11.1), binutils-gold (>= 2.23.52.20130522) - [amd64 armel armhf i386 powerpc powerpcspe ppc64 sparc sparc64 x32], + [amd64 armhf i386 powerpc powerpcspe ppc64 sparc sparc64 x32], lcov, procps, help2man Build-Conflicts: oprofile, ocaml Standards-Version: 3.9.4 diff --git a/debian/patches/kfreebsd.diff b/debian/patches/kfreebsd.diff index af8b9f88..99c43d72 100644 --- a/debian/patches/kfreebsd.diff +++ b/debian/patches/kfreebsd.diff @@ -1,7 +1,5 @@ -Index: llvm-toolchain-3.3-3.3/lldb/include/lldb/Host/Config.h -=================================================================== ---- llvm-toolchain-3.3-3.3.orig/lldb/include/lldb/Host/Config.h 2013-06-24 01:05:00.775028374 +0200 -+++ llvm-toolchain-3.3-3.3/lldb/include/lldb/Host/Config.h 2013-06-24 01:05:00.767028374 +0200 +--- test/llvm-toolchain-3.3-3.3~+rc3/lldb/include/lldb/Host/Config.h 2011-04-01 18:18:34.000000000 +0000 ++++ llvm-toolchain-3.3-3.3~+rc3/lldb/include/lldb/Host/Config.h 2013-06-06 07:59:19.000000000 +0000 @@ -18,7 +18,7 @@ #include "lldb/Host/linux/Config.h" @@ -11,10 +9,8 @@ Index: llvm-toolchain-3.3-3.3/lldb/include/lldb/Host/Config.h #include "lldb/Host/freebsd/Config.h" -Index: llvm-toolchain-3.3-3.3/lldb/source/Core/Mangled.cpp -=================================================================== ---- llvm-toolchain-3.3-3.3.orig/lldb/source/Core/Mangled.cpp 2013-06-24 01:05:00.775028374 +0200 -+++ llvm-toolchain-3.3-3.3/lldb/source/Core/Mangled.cpp 2013-06-24 01:05:28.000000000 +0200 +--- test/llvm-toolchain-3.3-3.3~+rc3/lldb/source/Core/Mangled.cpp 2012-09-11 18:11:12.000000000 +0000 ++++ llvm-toolchain-3.3-3.3~+rc3/lldb/source/Core/Mangled.cpp 2013-06-06 07:58:59.000000000 +0000 @@ -30,6 +30,7 @@ #include "lldb/Core/Timer.h" #include @@ -23,10 +19,8 @@ Index: llvm-toolchain-3.3-3.3/lldb/source/Core/Mangled.cpp using namespace lldb_private; -Index: llvm-toolchain-3.3-3.3/lldb/source/Host/common/Host.cpp -=================================================================== ---- llvm-toolchain-3.3-3.3.orig/lldb/source/Host/common/Host.cpp 2013-06-24 01:05:00.775028374 +0200 -+++ llvm-toolchain-3.3-3.3/lldb/source/Host/common/Host.cpp 2013-06-24 01:05:28.000000000 +0200 +--- test/llvm-toolchain-3.3-3.3~+rc3/lldb/source/Host/common/Host.cpp 2013-05-15 18:27:08.000000000 +0000 ++++ llvm-toolchain-3.3-3.3~+rc3/lldb/source/Host/common/Host.cpp 2013-06-06 07:59:01.000000000 +0000 @@ -151,7 +151,7 @@ delete info; @@ -36,42 +30,6 @@ Index: llvm-toolchain-3.3-3.3/lldb/source/Host/common/Host.cpp #define __WALL 0 #endif const int options = __WALL; -@@ -513,7 +513,7 @@ - { - } - --#if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined (__linux__) // see macosx/Host.mm -+#if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined (__linux__) // see macosx/Host.mm - - void - Host::ThreadCreated (const char *thread_name) -@@ -533,7 +533,7 @@ - return 0; - } - --#endif // #if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined (__linux__) -+#endif // #if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined (__linux__) - - struct HostThreadCreateInfo - { -@@ -1169,7 +1169,7 @@ - return NULL; - } - --#if !defined (__APPLE__) && !defined (__FreeBSD__) // see macosx/Host.mm -+#if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined (__FreeBSD_kernel__) // see macosx/Host.mm - bool - Host::GetOSBuildString (std::string &s) - { -@@ -1218,7 +1218,7 @@ - } - #endif // #if !defined (__APPLE__) && !defined(__linux__) - --#if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined(__linux__) -+#if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined (__FreeBSD_kernel__) && !defined(__linux__) - bool - Host::GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &process_info) - { @@ -1441,7 +1441,11 @@ g_num_cores = 0; int num_cores = 0; @@ -84,10 +42,8 @@ Index: llvm-toolchain-3.3-3.3/lldb/source/Host/common/Host.cpp /* get the number of CPUs from the system */ if (sysctl(mib, sizeof(mib)/sizeof(int), &num_cores, &num_cores_len, NULL, 0) == 0 && (num_cores > 0)) -Index: llvm-toolchain-3.3-3.3/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt -=================================================================== ---- llvm-toolchain-3.3-3.3.orig/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt 2013-06-24 01:05:00.775028374 +0200 -+++ llvm-toolchain-3.3-3.3/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt 2013-06-24 01:05:00.771028374 +0200 +--- test/llvm-toolchain-3.3-3.3~+rc3/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt 2013-02-21 20:58:22.000000000 +0000 ++++ llvm-toolchain-3.3-3.3~+rc3/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt 2013-06-06 07:59:04.000000000 +0000 @@ -1,5 +1,8 @@ set(LLVM_NO_RTTI 1) @@ -97,59 +53,3 @@ Index: llvm-toolchain-3.3-3.3/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt add_lldb_library(lldbPluginProcessFreeBSD ProcessFreeBSD.cpp ProcessMonitor.cpp -Index: llvm-toolchain-3.3-3.3/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp -=================================================================== ---- llvm-toolchain-3.3-3.3.orig/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp 2013-06-24 01:05:00.775028374 +0200 -+++ llvm-toolchain-3.3-3.3/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp 2013-06-24 01:05:28.000000000 +0200 -@@ -17,6 +17,8 @@ - #include - #include - #include -+#include -+#include - - // C++ Includes - // Other libraries and framework includes -@@ -530,6 +532,7 @@ - void - SiginfoOperation::Execute(ProcessMonitor *monitor) - { -+#if !defined (__FreeBSD_kernel__) - struct ptrace_lwpinfo plwp; - - if (PTRACE(PT_LWPINFO, m_tid, (caddr_t)&plwp, sizeof(plwp))) { -@@ -539,6 +542,7 @@ - memcpy(m_info, &plwp.pl_siginfo, sizeof(siginfo_t)); - m_result = true; - } -+#endif - } - - //------------------------------------------------------------------------------ -@@ -561,6 +565,7 @@ - void - EventMessageOperation::Execute(ProcessMonitor *monitor) - { -+#if !defined (__FreeBSD_kernel__) - struct ptrace_lwpinfo plwp; - - if (PTRACE(PT_LWPINFO, m_tid, (caddr_t)&plwp, sizeof(plwp))) -@@ -572,6 +577,7 @@ - } else - m_result = false; - } -+#endif - } - - //------------------------------------------------------------------------------ -Index: llvm-toolchain-3.3-3.3/lldb/lib/Makefile -=================================================================== ---- llvm-toolchain-3.3-3.3.orig/lldb/lib/Makefile 2013-06-24 01:05:28.000000000 +0200 -+++ llvm-toolchain-3.3-3.3/lldb/lib/Makefile 2013-06-24 01:05:40.839027019 +0200 -@@ -150,5 +150,5 @@ - # Allow unresolved symbols. - LLVMLibsOptions += -Wl,--allow-shlib-undefined - # Link in python -- LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -L/usr/local/lib -lexecinfo -+ LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -L/usr/local/lib - endif diff --git a/debian/patches/kfreebsd_ptrace_kludge.diff b/debian/patches/kfreebsd_ptrace_kludge.diff new file mode 100644 index 00000000..5f3a3ef3 --- /dev/null +++ b/debian/patches/kfreebsd_ptrace_kludge.diff @@ -0,0 +1,77 @@ +--- a/lldb/source/Host/freebsd/Host.cpp ++++ b/lldb/source/Host/freebsd/Host.cpp +@@ -20,6 +20,35 @@ + #include + #include + ++#include ++#include ++#include ++ ++#define PT_LWPINFO 13 /* Info about the LWP that stopped. */ ++#define PT_GETNUMLWPS 14 /* get total number of threads */ ++#define PT_GETLWPLIST 15 /* get thread list */ ++ ++/* Argument structure for PT_LWPINFO. */ ++struct ptrace_lwpinfo { ++ __lwpid_t pl_lwpid; /* LWP described. */ ++ int pl_event; /* Event that stopped the LWP. */ ++#define PL_EVENT_NONE 0 ++#define PL_EVENT_SIGNAL 1 ++ int pl_flags; /* LWP flags. */ ++#define PL_FLAG_SA 0x01 /* M:N thread */ ++#define PL_FLAG_BOUND 0x02 /* M:N bound thread */ ++#define PL_FLAG_SCE 0x04 /* syscall enter point */ ++#define PL_FLAG_SCX 0x08 /* syscall leave point */ ++#define PL_FLAG_EXEC 0x10 /* exec(2) succeeded */ ++#define PL_FLAG_SI 0x20 /* siginfo is valid */ ++#define PL_FLAG_FORKED 0x40 /* new child */ ++#define PL_FLAG_CHILD 0x80 /* I am from child */ ++ sigset_t pl_sigmask; /* LWP signal mask */ ++ sigset_t pl_siglist; /* LWP pending signal */ ++ struct siginfo pl_siginfo; /* siginfo for signal */ ++ char pl_tdname[MAXCOMLEN + 1]; /* LWP name */ ++ int pl_child_pid; /* New child pid */ ++}; + + // C++ Includes + // Other libraries and framework includes +--- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp ++++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp +@@ -18,6 +18,36 @@ + #include + #include + ++#include ++#include ++#include ++ ++#define PT_LWPINFO 13 /* Info about the LWP that stopped. */ ++#define PT_GETNUMLWPS 14 /* get total number of threads */ ++#define PT_GETLWPLIST 15 /* get thread list */ ++ ++/* Argument structure for PT_LWPINFO. */ ++struct ptrace_lwpinfo { ++ __lwpid_t pl_lwpid; /* LWP described. */ ++ int pl_event; /* Event that stopped the LWP. */ ++#define PL_EVENT_NONE 0 ++#define PL_EVENT_SIGNAL 1 ++ int pl_flags; /* LWP flags. */ ++#define PL_FLAG_SA 0x01 /* M:N thread */ ++#define PL_FLAG_BOUND 0x02 /* M:N bound thread */ ++#define PL_FLAG_SCE 0x04 /* syscall enter point */ ++#define PL_FLAG_SCX 0x08 /* syscall leave point */ ++#define PL_FLAG_EXEC 0x10 /* exec(2) succeeded */ ++#define PL_FLAG_SI 0x20 /* siginfo is valid */ ++#define PL_FLAG_FORKED 0x40 /* new child */ ++#define PL_FLAG_CHILD 0x80 /* I am from child */ ++ sigset_t pl_sigmask; /* LWP signal mask */ ++ sigset_t pl_siglist; /* LWP pending signal */ ++ struct siginfo pl_siginfo; /* siginfo for signal */ ++ char pl_tdname[MAXCOMLEN + 1]; /* LWP name */ ++ int pl_child_pid; /* New child pid */ ++}; ++ + // C++ Includes + // Other libraries and framework includes + #include "lldb/Core/Error.h" diff --git a/debian/patches/kfreebsd_v2.diff b/debian/patches/kfreebsd_v2.diff new file mode 100644 index 00000000..fb43e575 --- /dev/null +++ b/debian/patches/kfreebsd_v2.diff @@ -0,0 +1,307 @@ +--- a/lldb/source/Host/common/Host.cpp ++++ b/lldb/source/Host/common/Host.cpp +@@ -27,7 +27,7 @@ + #include + #include + +-#elif defined (__linux__) || defined(__FreeBSD_kernel__) ++#elif defined (__linux__) || defined(__GLIBC__) + /* Linux or the FreeBSD kernel with glibc (Debian KFreeBSD for example) */ + + #include +@@ -524,7 +524,7 @@ + { + } + +-#if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined (__linux__) // see macosx/Host.mm ++#if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined (__FreeBSD_kernel__) && !defined (__linux__) // see macosx/Host.mm + + void + Host::ThreadCreated (const char *thread_name) +@@ -544,7 +544,7 @@ + return 0; + } + +-#endif // #if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined (__linux__) ++#endif // #if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined (__FreeBSD_kernel__) && !defined (__linux__) + + struct HostThreadCreateInfo + { +@@ -684,7 +684,7 @@ + return true; + } + return false; +-#elif defined (__linux__) ++#elif defined (__linux__) || defined (__GLIBC__) + void *fn = dlsym (RTLD_DEFAULT, "pthread_setname_np"); + if (fn) + { +@@ -742,7 +742,7 @@ + exe_path[len] = 0; + g_program_filespec.SetFile(exe_path, false); + } +-#elif defined (__FreeBSD__) ++#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) + int exe_path_mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, getpid() }; + size_t exe_path_size; + if (sysctl(exe_path_mib, 4, NULL, &exe_path_size, NULL, 0) == 0) +@@ -1180,7 +1180,7 @@ + return NULL; + } + +-#if !defined (__APPLE__) && !defined (__FreeBSD__) // see macosx/Host.mm ++#if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined (__FreeBSD_kernel__) // see macosx/Host.mm + bool + Host::GetOSBuildString (std::string &s) + { +@@ -1229,7 +1229,7 @@ + } + #endif // #if !defined (__APPLE__) && !defined(__linux__) + +-#if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined(__linux__) ++#if !defined (__APPLE__) && !defined (__FreeBSD__) && !defined (__FreeBSD_kernel__) && !defined(__linux__) + bool + Host::GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &process_info) + { +@@ -1443,7 +1443,7 @@ + static uint32_t g_num_cores = UINT32_MAX; + if (g_num_cores == UINT32_MAX) + { +-#if defined(__APPLE__) or defined (__linux__) or defined (__FreeBSD__) ++#if defined(__APPLE__) or defined (__linux__) or defined (__FreeBSD__) or defined (__FreeBSD_kernel__) + + g_num_cores = ::sysconf(_SC_NPROCESSORS_ONLN); + +--- a/Makefile.rules ++++ b/Makefile.rules +@@ -275,10 +275,12 @@ + BuildMode := Release + # Don't use -fomit-frame-pointer on Darwin or FreeBSD. + ifneq ($(HOST_OS),FreeBSD) ++ ifneq ($(HOST_OS),GNU/kFreeBSD) + ifneq ($(HOST_OS),Darwin) + OmitFramePointer := -fomit-frame-pointer + endif + endif ++ endif + + CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer) + C.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer) +@@ -1454,7 +1456,7 @@ + endif + endif + +-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD GNU)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD GNU/kFreeBSD GNU)) + ifneq ($(ARCH), Mips) + LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map + endif +--- a/autoconf/configure.ac ++++ b/autoconf/configure.ac +@@ -222,11 +222,16 @@ + llvm_cv_no_link_all_option="-Wl,-noall_load" + llvm_cv_os_type="Minix" + llvm_cv_platform_type="Unix" ;; +- *-*-freebsd* | *-*-kfreebsd-gnu) ++ *-*-freebsd*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="FreeBSD" + llvm_cv_platform_type="Unix" ;; ++ *-*-kfreebsd-gnu) ++ llvm_cv_link_all_option="-Wl,--whole-archive" ++ llvm_cv_no_link_all_option="-Wl,--no-whole-archive" ++ llvm_cv_os_type="GNU/kFreeBSD" ++ llvm_cv_platform_type="Unix" ;; + *-*-openbsd*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" +@@ -317,8 +322,10 @@ + llvm_cv_target_os_type="Darwin" ;; + *-*-minix*) + llvm_cv_target_os_type="Minix" ;; +- *-*-freebsd* | *-*-kfreebsd-gnu) ++ *-*-freebsd*) + llvm_cv_target_os_type="FreeBSD" ;; ++ *-*-kfreebsd-gnu) ++ llvm_cv_target_os_type="GNU/kFreeBSD" ;; + *-*-openbsd*) + llvm_cv_target_os_type="OpenBSD" ;; + *-*-netbsd*) +--- a/clang/tools/libclang/Makefile ++++ b/clang/tools/libclang/Makefile +@@ -30,7 +30,7 @@ + include $(CLANG_LEVEL)/Makefile + + # Add soname to the library. +-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU GNU/kFreeBSD)) + LDFLAGS += -Wl,-soname,lib$(LIBRARYNAME)$(SHLIBEXT).$(SONAME_MAJOR) + endif + +--- a/configure ++++ b/configure +@@ -3824,11 +3824,16 @@ + llvm_cv_no_link_all_option="-Wl,-noall_load" + llvm_cv_os_type="Minix" + llvm_cv_platform_type="Unix" ;; +- *-*-freebsd* | *-*-kfreebsd-gnu) ++ *-*-freebsd*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="FreeBSD" + llvm_cv_platform_type="Unix" ;; ++ *-*-kfreebsd-gnu) ++ llvm_cv_link_all_option="-Wl,--whole-archive" ++ llvm_cv_no_link_all_option="-Wl,--no-whole-archive" ++ llvm_cv_os_type="GNU/kFreeBSD" ++ llvm_cv_platform_type="Unix" ;; + *-*-openbsd*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" +@@ -3925,8 +3930,10 @@ + llvm_cv_target_os_type="Darwin" ;; + *-*-minix*) + llvm_cv_target_os_type="Minix" ;; +- *-*-freebsd* | *-*-kfreebsd-gnu) ++ *-*-freebsd*) + llvm_cv_target_os_type="FreeBSD" ;; ++ *-*-kfreebsd-gnu) ++ llvm_cv_target_os_type="GNU/kFreeBSD" ;; + *-*-openbsd*) + llvm_cv_target_os_type="OpenBSD" ;; + *-*-netbsd*) +--- a/lldb/lib/Makefile ++++ b/lldb/lib/Makefile +@@ -99,7 +99,7 @@ + lldbPluginDynamicLoaderMacOSX.a + endif + +-ifeq ($(HOST_OS),FreeBSD) ++ifneq (,$(filter $(HOST_OS), FreeBSD GNU/kFreeBSD)) + USEDLIBS += lldbHostFreeBSD.a \ + lldbPluginProcessPOSIX.a \ + lldbPluginProcessFreeBSD.a +@@ -132,7 +132,7 @@ + endif + endif + +-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD)) + # Include everything from the .a's into the shared library. + ProjLibsOptions := -Wl,--whole-archive $(ProjLibsOptions) \ + -Wl,--no-whole-archive +--- a/lldb/source/Host/Makefile ++++ b/lldb/source/Host/Makefile +@@ -21,7 +21,7 @@ + DIRS += linux + endif + +-ifeq ($(HOST_OS),FreeBSD) ++ifneq (,$(filter $(HOST_OS), FreeBSD GNU/kFreeBSD)) + DIRS += freebsd + endif + +--- a/lldb/source/Plugins/Platform/Makefile ++++ b/lldb/source/Plugins/Platform/Makefile +@@ -24,5 +24,9 @@ + # ifeq ($(HOST_OS),FreeBSD) + # DIRS += FreeBSD + # endif ++# ++# ifeq ($(HOST_OS),GNU/kFreeBSD) ++# DIRS += FreeBSD ++# endif + + include $(LLDB_LEVEL)/Makefile +--- a/lldb/source/Plugins/Process/POSIX/Makefile ++++ b/lldb/source/Plugins/Process/POSIX/Makefile +@@ -24,7 +24,7 @@ + CPPFLAGS += -Wno-extended-offsetof + endif + +-ifeq ($(HOST_OS),FreeBSD) ++ifneq (,$(filter $(HOST_OS), FreeBSD GNU/kFreeBSD)) + # Extend the include path so we may locate ProcessMonitor + CPPFLAGS += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Process/FreeBSD + endif +--- a/projects/sample/Makefile.llvm.rules ++++ b/projects/sample/Makefile.llvm.rules +@@ -208,10 +208,12 @@ + BuildMode := Release + # Don't use -fomit-frame-pointer on Darwin or FreeBSD. + ifneq ($(HOST_OS),FreeBSD) ++ ifneq ($(HOST_OS),GNU/kFreeBSD) + ifneq ($(HOST_OS),Darwin) + OmitFramePointer := -fomit-frame-pointer + endif + endif ++ endif + + # Darwin requires -fstrict-aliasing to be explicitly enabled. + # Avoid -fstrict-aliasing on Darwin for now, there are unresolved issues +@@ -1372,7 +1374,7 @@ + endif + endif + +-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD GNU/kFreeBSD)) + ifneq ($(ARCH), Mips) + LD.Flags += -Wl,--version-script=$(PROJ_SRC_ROOT)/autoconf/ExportMap.map + endif +--- a/tools/llvm-shlib/Makefile ++++ b/tools/llvm-shlib/Makefile +@@ -69,18 +69,18 @@ + endif + endif + +-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD OpenBSD GNU Bitrig)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU/kFreeBSD OpenBSD GNU Bitrig)) + # Include everything from the .a's into the shared library. + LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \ + -Wl,--no-whole-archive + endif + +-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU/kFreeBSD GNU)) + # Add soname to the library. + LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT).1 -Wl,-Bsymbolic-functions + endif + +-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD)) + # Don't allow unresolved symbols. + LLVMLibsOptions += -Wl,--no-undefined + endif +--- a/lldb/source/Plugins/Makefile ++++ b/lldb/source/Plugins/Makefile +@@ -36,7 +36,7 @@ + DIRS += Process/Linux Process/POSIX + endif + +-ifeq ($(HOST_OS),FreeBSD) ++ifneq (,$(filter $(HOST_OS), FreeBSD GNU/kFreeBSD)) + DIRS += Process/FreeBSD Process/POSIX + endif + +--- a/lldb/tools/driver/Makefile ++++ b/lldb/tools/driver/Makefile +@@ -21,7 +21,7 @@ + LLVMLibsOptions += -Wl,-sectcreate -Wl,__TEXT -Wl,__info_plist -Wl,"$(PROJ_SRC_DIR)/lldb-Info.plist" + endif + +-ifeq ($(HOST_OS),Linux) ++ifneq (,$(filter $(HOST_OS), Linux GNU/kFreeBSD)) + LLVMLibsOptions += -Wl,-rpath,$(LibDir) + endif + +--- a/lldb/tools/lldb-platform/Makefile ++++ b/lldb/tools/lldb-platform/Makefile +@@ -18,6 +18,6 @@ + LLVMLibsOptions += -Wl,-rpath,@loader_path/../lib/ + endif + +-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD)) ++ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU/kFreeBSD)) + LLVMLibsOptions += -Wl,-rpath,$(LibDir) + endif diff --git a/debian/patches/series b/debian/patches/series index 3924b72f..3e67a73e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -27,3 +27,5 @@ add-ubuntu-saucy.patch lldb33-to-r183444.patch disabletestlldb.diff mipsel-ftbfs.diff +kfreebsd_ptrace_kludge.diff +kfreebsd_v2.diff