tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH 4/7] Implement Makefiles for building lldb and lldb-server



Add Makefiles to build LLDB libraries, and 'lldb' and 'lldb-server'
executables.  They are built conditionally to a new MKLLDB variable.
Additionally, some of necessary LLVM libraries are now enabled on MKLLDB
(alternatively to LLVM_DEVELOPER).
---
 distrib/sets/lists/comp/mi                    |   4 +-
 distrib/sets/lists/debug/mi                   |   3 +
 external/apache2/llvm/Makefile.inc            |   6 +-
 .../llvm/autoconf/autoconf/configure.ac       |   3 +
 external/apache2/llvm/autoconf/configure      |   4 +
 .../autoconf/include/lldb/Host/Config.h.in    |  53 ++++
 external/apache2/llvm/bin/Makefile            |   7 +
 .../apache2/llvm/bin/lldb-server/Makefile     | 201 ++++++++++++
 .../apache2/llvm/bin/lldb-tblgen/Makefile     |  23 ++
 external/apache2/llvm/bin/lldb/Makefile       | 286 ++++++++++++++++++
 .../apache2/llvm/config/lldb/Host/Config.h    |  53 ++++
 external/apache2/llvm/gen-lldb-makefiles.py   |  75 +++++
 external/apache2/llvm/lib/Makefile            | 105 ++++++-
 external/apache2/llvm/lib/liblldb/Makefile    |  88 ++++++
 .../apache2/llvm/lib/liblldbBase/Makefile     |  19 ++
 .../llvm/lib/liblldbBreakpoint/Makefile       |  39 +++
 .../apache2/llvm/lib/liblldbCommands/Makefile |  57 ++++
 .../apache2/llvm/lib/liblldbCore/Makefile     |  74 +++++
 .../llvm/lib/liblldbDataFormatters/Makefile   |  32 ++
 .../llvm/lib/liblldbExpression/Makefile       |  28 ++
 .../apache2/llvm/lib/liblldbHost/Makefile     |  69 +++++
 .../llvm/lib/liblldbInitialization/Makefile   |  18 ++
 .../llvm/lib/liblldbInterpreter/Makefile      |  74 +++++
 .../lib/liblldbPluginABIMacOSX_arm/Makefile   |  16 +
 .../lib/liblldbPluginABIMacOSX_arm64/Makefile |  16 +
 .../lib/liblldbPluginABIMacOSX_i386/Makefile  |  16 +
 .../lib/liblldbPluginABISysV_arc/Makefile     |  16 +
 .../lib/liblldbPluginABISysV_arm/Makefile     |  16 +
 .../lib/liblldbPluginABISysV_arm64/Makefile   |  16 +
 .../lib/liblldbPluginABISysV_hexagon/Makefile |  16 +
 .../lib/liblldbPluginABISysV_i386/Makefile    |  16 +
 .../lib/liblldbPluginABISysV_mips/Makefile    |  16 +
 .../lib/liblldbPluginABISysV_mips64/Makefile  |  16 +
 .../lib/liblldbPluginABISysV_ppc/Makefile     |  16 +
 .../lib/liblldbPluginABISysV_ppc64/Makefile   |  16 +
 .../lib/liblldbPluginABISysV_s390x/Makefile   |  16 +
 .../lib/liblldbPluginABISysV_x86_64/Makefile  |  16 +
 .../liblldbPluginABIWindows_x86_64/Makefile   |  16 +
 .../liblldbPluginAppleObjCRuntime/Makefile    |  23 ++
 .../lib/liblldbPluginArchitectureArm/Makefile |  16 +
 .../liblldbPluginArchitectureMips/Makefile    |  16 +
 .../liblldbPluginArchitecturePPC64/Makefile   |  16 +
 .../llvm/lib/liblldbPluginCPPRuntime/Makefile |  16 +
 .../liblldbPluginCPlusPlusLanguage/Makefile   |  35 +++
 .../lib/liblldbPluginCXXItaniumABI/Makefile   |  16 +
 .../lib/liblldbPluginClangCommon/Makefile     |  16 +
 .../liblldbPluginDisassemblerLLVM/Makefile    |  16 +
 .../Makefile                                  |  26 ++
 .../Makefile                                  |  17 ++
 .../Makefile                                  |  18 ++
 .../Makefile                                  |  17 ++
 .../liblldbPluginDynamicLoaderStatic/Makefile |  16 +
 .../Makefile                                  |  16 +
 .../Makefile                                  |  34 +++
 .../lib/liblldbPluginInstructionARM/Makefile  |  17 ++
 .../liblldbPluginInstructionARM64/Makefile    |  16 +
 .../lib/liblldbPluginInstructionMIPS/Makefile |  16 +
 .../liblldbPluginInstructionMIPS64/Makefile   |  16 +
 .../liblldbPluginInstructionPPC64/Makefile    |  16 +
 .../Makefile                                  |  16 +
 .../Makefile                                  |  16 +
 .../Makefile                                  |  16 +
 .../Makefile                                  |  16 +
 .../lib/liblldbPluginJITLoaderGDB/Makefile    |  26 ++
 .../liblldbPluginMemoryHistoryASan/Makefile   |  16 +
 .../llvm/lib/liblldbPluginOSPython/Makefile   |  16 +
 .../lib/liblldbPluginObjCLanguage/Makefile    |  26 ++
 .../Makefile                                  |  16 +
 .../lib/liblldbPluginObjCRuntime/Makefile     |  16 +
 .../Makefile                                  |  16 +
 .../Makefile                                  |  16 +
 .../liblldbPluginObjectFileBreakpad/Makefile  |  17 ++
 .../lib/liblldbPluginObjectFileELF/Makefile   |  17 ++
 .../lib/liblldbPluginObjectFileJIT/Makefile   |  16 +
 .../lib/liblldbPluginObjectFileMachO/Makefile |  16 +
 .../liblldbPluginObjectFilePECOFF/Makefile    |  18 ++
 .../lib/liblldbPluginPlatformAndroid/Makefile |  18 ++
 .../lib/liblldbPluginPlatformFreeBSD/Makefile |  16 +
 .../lib/liblldbPluginPlatformGDB/Makefile     |  16 +
 .../lib/liblldbPluginPlatformLinux/Makefile   |  16 +
 .../lib/liblldbPluginPlatformMacOSX/Makefile  |  33 ++
 .../lib/liblldbPluginPlatformNetBSD/Makefile  |  16 +
 .../lib/liblldbPluginPlatformOpenBSD/Makefile |  16 +
 .../lib/liblldbPluginPlatformPOSIX/Makefile   |  16 +
 .../lib/liblldbPluginPlatformWindows/Makefile |  16 +
 .../lib/liblldbPluginProcessElfCore/Makefile  |  25 ++
 .../liblldbPluginProcessGDBRemote/Makefile    |  38 +++
 .../lib/liblldbPluginProcessMachCore/Makefile |  17 ++
 .../lib/liblldbPluginProcessMinidump/Makefile |  23 ++
 .../lib/liblldbPluginProcessNetBSD/Makefile   |  19 ++
 .../lib/liblldbPluginProcessPOSIX/Makefile    |  19 ++
 .../lib/liblldbPluginProcessUtility/Makefile  |  69 +++++
 .../liblldbPluginRenderScriptRuntime/Makefile |  19 ++
 .../Makefile                                  |  16 +
 .../Makefile                                  |  26 ++
 .../liblldbPluginSymbolFileBreakpad/Makefile  |  16 +
 .../lib/liblldbPluginSymbolFileDWARF/Makefile |  59 ++++
 .../liblldbPluginSymbolFileNativePDB/Makefile |  25 ++
 .../lib/liblldbPluginSymbolFilePDB/Makefile   |  18 ++
 .../liblldbPluginSymbolFileSymtab/Makefile    |  16 +
 .../lib/liblldbPluginSymbolVendorELF/Makefile |  16 +
 .../liblldbPluginSymbolVendorMacOSX/Makefile  |  16 +
 .../liblldbPluginSystemRuntimeMacOSX/Makefile |  20 ++
 .../Makefile                                  |  16 +
 .../liblldbPluginUnwindAssemblyX86/Makefile   |  17 ++
 .../apache2/llvm/lib/liblldbSymbol/Makefile   |  53 ++++
 .../apache2/llvm/lib/liblldbTarget/Makefile   |  82 +++++
 .../apache2/llvm/lib/liblldbUtility/Makefile  |  62 ++++
 external/apache2/llvm/link.mk                 |   6 +
 external/apache2/llvm/tablegen.mk             |  15 +
 share/mk/bsd.README                           |   3 +
 share/mk/bsd.own.mk                           |   1 +
 tools/Makefile                                |   4 +
 tools/llvm-lldb-tblgen/Makefile               |   7 +
 114 files changed, 3134 insertions(+), 4 deletions(-)
 create mode 100644 external/apache2/llvm/autoconf/include/lldb/Host/Config.h.in
 create mode 100644 external/apache2/llvm/bin/lldb-server/Makefile
 create mode 100644 external/apache2/llvm/bin/lldb-tblgen/Makefile
 create mode 100644 external/apache2/llvm/bin/lldb/Makefile
 create mode 100644 external/apache2/llvm/config/lldb/Host/Config.h
 create mode 100755 external/apache2/llvm/gen-lldb-makefiles.py
 create mode 100644 external/apache2/llvm/lib/liblldb/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbBase/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbBreakpoint/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbCommands/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbCore/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbDataFormatters/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbExpression/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbHost/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbInitialization/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbInterpreter/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABIMacOSX_arm/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABIMacOSX_arm64/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABIMacOSX_i386/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABISysV_arc/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABISysV_arm/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABISysV_arm64/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABISysV_hexagon/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABISysV_i386/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABISysV_mips/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABISysV_mips64/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABISysV_ppc/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABISysV_ppc64/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABISysV_s390x/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABISysV_x86_64/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginABIWindows_x86_64/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginAppleObjCRuntime/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginArchitectureArm/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginArchitectureMips/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginArchitecturePPC64/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginCPPRuntime/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginCPlusPlusLanguage/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginCXXItaniumABI/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginClangCommon/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginDisassemblerLLVM/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginDynamicLoaderDarwinKernel/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginDynamicLoaderHexagonDYLD/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginDynamicLoaderMacOSXDYLD/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginDynamicLoaderPosixDYLD/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginDynamicLoaderStatic/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginDynamicLoaderWindowsDYLD/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginExpressionParserClang/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginInstructionARM/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginInstructionARM64/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginInstructionMIPS/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginInstructionMIPS64/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginInstructionPPC64/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeASan/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeMainThreadChecker/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeTSan/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeUBSan/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginJITLoaderGDB/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginMemoryHistoryASan/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginOSPython/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginObjCLanguage/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginObjCPlusPlusLanguage/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginObjCRuntime/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginObjectContainerBSDArchive/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginObjectContainerMachOArchive/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginObjectFileBreakpad/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginObjectFileELF/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginObjectFileJIT/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginObjectFileMachO/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginObjectFilePECOFF/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginPlatformAndroid/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginPlatformFreeBSD/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginPlatformGDB/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginPlatformLinux/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginPlatformMacOSX/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginPlatformNetBSD/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginPlatformOpenBSD/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginPlatformPOSIX/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginPlatformWindows/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginProcessElfCore/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginProcessGDBRemote/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginProcessMachCore/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginProcessMinidump/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginProcessNetBSD/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginProcessPOSIX/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginProcessUtility/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginRenderScriptRuntime/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginScriptInterpreterNone/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginStructuredDataDarwinLog/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginSymbolFileBreakpad/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginSymbolFileDWARF/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginSymbolFileNativePDB/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginSymbolFilePDB/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginSymbolFileSymtab/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginSymbolVendorELF/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginSymbolVendorMacOSX/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginSystemRuntimeMacOSX/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginUnwindAssemblyInstEmulation/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbPluginUnwindAssemblyX86/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbSymbol/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbTarget/Makefile
 create mode 100644 external/apache2/llvm/lib/liblldbUtility/Makefile
 create mode 100644 tools/llvm-lldb-tblgen/Makefile

diff --git a/distrib/sets/lists/comp/mi b/distrib/sets/lists/comp/mi
index dc53fed14df6..a29511317b15 100644
--- a/distrib/sets/lists/comp/mi
+++ b/distrib/sets/lists/comp/mi
@@ -51,7 +51,9 @@
 ./usr/bin/lex					comp-c-bin
 ./usr/bin/lint					comp-c-bin
 ./usr/bin/lld					comp-obsolete		obsolete
-./usr/bin/lldb					comp-obsolete		obsolete
+./usr/bin/lldb					comp-c-bin		lldb
+./usr/bin/lldb-server				comp-c-bin		lldb
+./usr/bin/lldb-tblgen				comp-c-bin		lldb
 ./usr/bin/llvm-tblgen				comp-c-bin		llvm
 ./usr/bin/lorder				comp-util-bin
 ./usr/bin/luac					comp-util-bin
diff --git a/distrib/sets/lists/debug/mi b/distrib/sets/lists/debug/mi
index 8d53f107744f..98f6090422f1 100644
--- a/distrib/sets/lists/debug/mi
+++ b/distrib/sets/lists/debug/mi
@@ -630,6 +630,9 @@
 ./usr/libdata/debug/usr/bin/lex.debug		comp-c-debug		debug
 ./usr/libdata/debug/usr/bin/lint.debug		comp-c-debug		debug
 ./usr/libdata/debug/usr/bin/lkbib.debug		comp-groff-debug	groff,debug
+./usr/libdata/debug/usr/bin/lldb.debug		comp-c-debug		lldb,debug
+./usr/libdata/debug/usr/bin/lldb-server.debug	comp-c-debug		lldb,debug
+./usr/libdata/debug/usr/bin/lldb-tblgen.debug	comp-c-debug		lldb,debug
 ./usr/libdata/debug/usr/bin/llvm-tblgen.debug	comp-c-debug		llvm,debug
 ./usr/libdata/debug/usr/bin/locale.debug	comp-locale-debug	debug
 ./usr/libdata/debug/usr/bin/locate.debug	comp-util-debug		debug
diff --git a/external/apache2/llvm/Makefile.inc b/external/apache2/llvm/Makefile.inc
index 9a2498b53048..e62123802bbd 100644
--- a/external/apache2/llvm/Makefile.inc
+++ b/external/apache2/llvm/Makefile.inc
@@ -8,16 +8,20 @@ LLVM_TOPLEVEL_MK=
 COMMON_REVISION=	01f3a59fb3e2542fce74c768718f594d0debd0da
 CLANG_REVISION=		${COMMON_REVISION}
 LLVM_REVISION=		${COMMON_REVISION}
+LLDB_REVISION=		${COMMON_REVISION}
 
 LLVM_VERSION=		9.0.0
 CLANG_VERSION=		9.0.0
+LLDB_VERSION=		9.0.0
 
 CLANG_SRCDIR:=	${.PARSEDIR}/dist/clang
 LLVM_SRCDIR:=	${.PARSEDIR}/dist/llvm
+LLDB_SRCDIR:=	${.PARSEDIR}/dist/lldb
 LLVM_TOPLEVEL:=	${.PARSEDIR}
 CONFIG_DIR:=	${.PARSEDIR}/autoconf
 
-CPPFLAGS+=	-I. -I${CLANG_SRCDIR}/include -I${LLVM_SRCDIR}/include
+CPPFLAGS+=	-I. -I${CLANG_SRCDIR}/include -I${LLVM_SRCDIR}/include \
+		-I${LLDB_SRCDIR}/include -I${LLDB_SRCDIR}/source
 
 # Bogus warning with -O2 in GCC 7 and 8.
 CWARNFLAGS.gcc+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} < 9:? -Wno-stringop-overflow :}
diff --git a/external/apache2/llvm/autoconf/autoconf/configure.ac b/external/apache2/llvm/autoconf/autoconf/configure.ac
index 5fffd873df24..e437822bf696 100644
--- a/external/apache2/llvm/autoconf/autoconf/configure.ac
+++ b/external/apache2/llvm/autoconf/autoconf/configure.ac
@@ -2039,5 +2039,8 @@ if test -f ${clang_src_root}/README.txt; then
   AC_CONFIG_HEADERS([include/clang/Config/config.h])
 fi
 
+dnl Configure lldb
+AC_CONFIG_HEADERS([include/lldb/Host/Config.h])
+
 dnl Finally, crank out the output
 AC_OUTPUT
diff --git a/external/apache2/llvm/autoconf/configure b/external/apache2/llvm/autoconf/configure
index 86844663fcac..afa12749a258 100755
--- a/external/apache2/llvm/autoconf/configure
+++ b/external/apache2/llvm/autoconf/configure
@@ -10397,6 +10397,9 @@ if test -f ${clang_src_root}/README.txt; then
 
 fi
 
+ac_config_headers="$ac_config_headers include/lldb/Host/Config.h"
+
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -11096,6 +11099,7 @@ do
     "include/llvm/Config/Disassemblers.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/Disassemblers.def" ;;
     "include/llvm/Support/DataTypes.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Support/DataTypes.h" ;;
     "include/clang/Config/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/clang/Config/config.h" ;;
+    "include/lldb/Host/Config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lldb/Host/Config.h" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
diff --git a/external/apache2/llvm/autoconf/include/lldb/Host/Config.h.in b/external/apache2/llvm/autoconf/include/lldb/Host/Config.h.in
new file mode 100644
index 000000000000..d4089da73dc3
--- /dev/null
+++ b/external/apache2/llvm/autoconf/include/lldb/Host/Config.h.in
@@ -0,0 +1,53 @@
+//===-- Config.h -----------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_HOST_CONFIG_H
+#define LLDB_HOST_CONFIG_H
+
+#define LLDB_EDITLINE_USE_WCHAR 1
+
+#define LLDB_HAVE_EL_RFUNC_T 0
+
+
+#define HAVE_SYS_TYPES_H 1
+
+#define HAVE_SYS_EVENT_H 1
+
+#define HAVE_PPOLL 0
+
+#define HAVE_SIGACTION 1
+
+#define HAVE_PROCESS_VM_READV 0
+
+#define HAVE_NR_PROCESS_VM_READV 0
+
+#ifndef HAVE_LIBCOMPRESSION
+/* #undef HAVE_LIBCOMPRESSION */
+#endif
+
+#define LLDB_ENABLE_POSIX 1
+
+#define LLDB_ENABLE_TERMIOS 1
+
+#define LLDB_ENABLE_LZMA 0
+
+#define LLDB_ENABLE_CURSES 0
+
+#define LLDB_ENABLE_LIBEDIT 0
+
+#define LLDB_ENABLE_LIBXML2 0
+
+#define LLDB_ENABLE_LUA 0
+
+#define LLDB_ENABLE_PYTHON 0
+
+/* #undef LLDB_PYTHON_HOME */
+
+#define LLDB_LIBDIR_SUFFIX ""
+
+#endif // #ifndef LLDB_HOST_CONFIG_H
diff --git a/external/apache2/llvm/bin/Makefile b/external/apache2/llvm/bin/Makefile
index 360fd0a4e82b..b41ba9bf9741 100644
--- a/external/apache2/llvm/bin/Makefile
+++ b/external/apache2/llvm/bin/Makefile
@@ -6,6 +6,13 @@ SUBDIR=	clang \
 	clang-tblgen \
 	tblgen
 
+.if ${MKLLDB} != "no"
+SUBDIR+= \
+	lldb \
+	lldb-server \
+	lldb-tblgen
+.endif
+
 .if defined(LLVM_DEVELOPER)
 SUBDIR+= \
 	bugpoint \
diff --git a/external/apache2/llvm/bin/lldb-server/Makefile b/external/apache2/llvm/bin/lldb-server/Makefile
new file mode 100644
index 000000000000..2305fb675b63
--- /dev/null
+++ b/external/apache2/llvm/bin/lldb-server/Makefile
@@ -0,0 +1,201 @@
+#	$NetBSD$
+
+PROG_CXX=	lldb-server
+NOMAN=		yes
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/tools/lldb-server
+
+SRCS= \
+	Acceptor.cpp \
+	lldb-gdbserver.cpp \
+	lldb-platform.cpp \
+	lldb-server.cpp \
+	LLDBServerUtilities.cpp \
+	SystemInitializerLLGS.cpp
+
+LLDB_LIBS+= \
+	lldbBase \
+	lldbHost \
+	lldbInitialization \
+	lldbPluginProcessNetBSD \
+	lldbPluginObjectFileELF \
+	lldbPluginInstructionARM \
+	lldbPluginInstructionMIPS \
+	lldbPluginInstructionMIPS64 \
+	lldbPluginProcessGDBRemote \
+	lldbPluginPlatformMacOSX \
+	lldbPluginPlatformPOSIX \
+	lldbPluginProcessPOSIX \
+	lldbCore \
+	lldbSymbol \
+	lldbTarget \
+	lldbPluginProcessUtility \
+	lldbInterpreter \
+	lldbBreakpoint \
+	lldbDataFormatters \
+	lldbExpression \
+	lldbPluginCPlusPlusLanguage \
+	lldbPluginObjCLanguage \
+	lldbPluginExpressionParserClang \
+	lldbCommands \
+	lldbPluginObjectFileJIT \
+	lldbPluginClangCommon \
+	lldbPluginCPPRuntime \
+	lldbPluginAppleObjCRuntime \
+	lldbPluginObjCRuntime \
+	lldbPluginRenderScriptRuntime \
+	lldbPluginSymbolFileDWARF \
+	lldbPluginSymbolFilePDB \
+	lldbPluginSymbolFileNativePDB \
+	lldbCore \
+	lldbSymbol \
+	lldbTarget \
+	lldbPluginProcessUtility \
+	lldbInterpreter \
+	lldbBreakpoint \
+	lldbDataFormatters \
+	lldbExpression \
+	lldbPluginCPlusPlusLanguage \
+	lldbPluginObjCLanguage \
+	lldbPluginExpressionParserClang \
+	lldbCommands \
+	lldbPluginObjectFileJIT \
+	lldbPluginClangCommon \
+	lldbPluginCPPRuntime \
+	lldbPluginAppleObjCRuntime \
+	lldbPluginObjCRuntime \
+	lldbPluginRenderScriptRuntime \
+	lldbPluginSymbolFileDWARF \
+	lldbPluginSymbolFilePDB \
+	lldbPluginSymbolFileNativePDB \
+	lldbCore \
+	lldbSymbol \
+	lldbTarget \
+	lldbPluginProcessUtility \
+	lldbInterpreter \
+	lldbBreakpoint \
+	lldbDataFormatters \
+	lldbExpression \
+	lldbPluginCPlusPlusLanguage \
+	lldbPluginObjCLanguage \
+	lldbPluginExpressionParserClang \
+	lldbCommands \
+	lldbPluginObjectFileJIT \
+	lldbPluginClangCommon \
+	lldbPluginCPPRuntime \
+	lldbPluginAppleObjCRuntime \
+	lldbPluginObjCRuntime \
+	lldbPluginRenderScriptRuntime \
+	lldbPluginSymbolFileDWARF \
+	lldbPluginSymbolFilePDB \
+	lldbPluginSymbolFileNativePDB \
+	lldbCore \
+	lldbSymbol \
+	lldbTarget \
+	lldbPluginProcessUtility \
+	lldbInterpreter \
+	lldbBreakpoint \
+	lldbDataFormatters \
+	lldbExpression \
+	lldbPluginCPlusPlusLanguage \
+	lldbPluginObjCLanguage \
+	lldbPluginExpressionParserClang \
+	lldbCommands \
+	lldbPluginObjectFileJIT \
+	lldbPluginClangCommon \
+	lldbPluginCPPRuntime \
+	lldbPluginAppleObjCRuntime \
+	lldbPluginObjCRuntime \
+	lldbPluginRenderScriptRuntime \
+	lldbPluginSymbolFileDWARF \
+	lldbPluginSymbolFilePDB \
+	lldbPluginSymbolFileNativePDB \
+	lldbCore \
+	lldbSymbol \
+	lldbTarget \
+	lldbPluginProcessUtility \
+	lldbInterpreter \
+	lldbBreakpoint \
+	lldbDataFormatters \
+	lldbExpression \
+	lldbPluginCPlusPlusLanguage \
+	lldbPluginObjCLanguage \
+	lldbPluginExpressionParserClang \
+	lldbCommands \
+	lldbPluginObjectFileJIT \
+	lldbPluginClangCommon \
+	lldbPluginCPPRuntime \
+	lldbPluginAppleObjCRuntime \
+	lldbPluginObjCRuntime \
+	lldbPluginRenderScriptRuntime \
+	lldbPluginSymbolFileDWARF \
+	lldbPluginSymbolFilePDB \
+	lldbPluginSymbolFileNativePDB \
+	lldbBase \
+	lldbHost \
+	lldbUtility
+
+CLANG_LIBS+= \
+	clangCodeGen \
+	clangRewrite \
+	clangFrontend \
+	clangDriver \
+	clangParse \
+	clangSerialization \
+	clangSema \
+	clangEdit \
+	clangAnalysis \
+	clangASTMatchers \
+	clangAST \
+	clangLex \
+	clangBasic
+
+LLVM_LIBS+= \
+	Support \
+	LTO \
+	Passes \
+	ipo \
+	Instrumentation \
+	Linker \
+	Vectorize \
+	Option \
+	IRReader \
+	AsmParser \
+	MipsCodeGen \
+	AsmPrinter \
+	DebugInfoDWARF \
+	GlobalISel \
+	SelectionDAG \
+	CodeGen \
+	BitWriter \
+	ScalarOpts \
+	InstCombine \
+	Target \
+	Analysis \
+	Object \
+	BitReader \
+	TextAPI \
+	ProfileData \
+	Remarks \
+	BitstreamReader \
+	MipsAsmParser \
+	MCParser \
+	MipsDisassembler \
+	MCDisassembler \
+	MC \
+	BinaryFormat \
+	DebugInfoCodeView \
+	DebugInfoMSF \
+	Support \
+	Demangle
+
+.include "${.PARSEDIR}/../../link.mk"
+
+LDADD+=	-lkvm -lutil -lz
+.if !defined(HOSTPROG)
+DPADD+=	${LIBKVM} ${LIBUTIL} ${LIBZ}
+.endif
+
+.include <bsd.prog.mk>
diff --git a/external/apache2/llvm/bin/lldb-tblgen/Makefile b/external/apache2/llvm/bin/lldb-tblgen/Makefile
new file mode 100644
index 000000000000..0d8db2199efc
--- /dev/null
+++ b/external/apache2/llvm/bin/lldb-tblgen/Makefile
@@ -0,0 +1,23 @@
+#	$NetBSD$
+
+PROG_CXX=	lldb-tblgen
+NOMAN=		yes
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/utils/TableGen
+
+SRCS= \
+	LLDBOptionDefEmitter.cpp \
+	LLDBPropertyDefEmitter.cpp \
+	LLDBTableGen.cpp \
+	LLDBTableGenUtils.cpp
+
+LLVM_LIBS+= \
+	TableGen \
+	Support \
+	Demangle
+
+.include "${.PARSEDIR}/../../link.mk"
+
+.include <bsd.prog.mk>
diff --git a/external/apache2/llvm/bin/lldb/Makefile b/external/apache2/llvm/bin/lldb/Makefile
new file mode 100644
index 000000000000..d9e846649371
--- /dev/null
+++ b/external/apache2/llvm/bin/lldb/Makefile
@@ -0,0 +1,286 @@
+#	$NetBSD$
+
+PROG_CXX=	lldb
+NOMAN=		yes
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/tools/driver
+
+SRCS= \
+	Driver.cpp \
+	Platform.cpp
+
+LLDB_LIBS+= \
+	lldb \
+	lldbInitialization \
+	lldbPluginABIMacOSX_arm64 \
+	lldbPluginABISysV_arm64 \
+	lldbPluginABIMacOSX_arm \
+	lldbPluginABISysV_arm \
+	lldbPluginABISysV_mips \
+	lldbPluginABISysV_mips64 \
+	lldbPluginABISysV_ppc \
+	lldbPluginABISysV_ppc64 \
+	lldbPluginABISysV_i386 \
+	lldbPluginABISysV_x86_64 \
+	lldbPluginABIMacOSX_i386 \
+	lldbPluginABIWindows_x86_64 \
+	lldbPluginArchitectureArm \
+	lldbPluginArchitectureMips \
+	lldbPluginArchitecturePPC64 \
+	lldbPluginDisassemblerLLVM \
+	lldbPluginDynamicLoaderStatic \
+	lldbPluginDynamicLoaderHexagonDYLD \
+	lldbPluginDynamicLoaderWindowsDYLD \
+	lldbPluginInstructionARM \
+	lldbPluginInstructionARM64 \
+	lldbPluginInstructionMIPS \
+	lldbPluginInstructionMIPS64 \
+	lldbPluginInstructionPPC64 \
+	lldbPluginInstrumentationRuntimeASan \
+	lldbPluginInstrumentationRuntimeMainThreadChecker \
+	lldbPluginInstrumentationRuntimeTSan \
+	lldbPluginInstrumentationRuntimeUBSan \
+	lldbPluginJITLoaderGDB \
+	lldbPluginObjCPlusPlusLanguage \
+	lldbPluginCXXItaniumABI \
+	lldbPluginRenderScriptRuntime \
+	lldbPluginMemoryHistoryASan \
+	lldbPluginObjectContainerBSDArchive \
+	lldbPluginObjectContainerMachOArchive \
+	lldbPluginObjectFilePECOFF \
+	lldbPluginOSPython \
+	lldbPluginPlatformFreeBSD \
+	lldbPluginPlatformNetBSD \
+	lldbPluginPlatformOpenBSD \
+	lldbPluginPlatformWindows \
+	lldbPluginPlatformAndroid \
+	lldbPluginPlatformLinux \
+	lldbPluginPlatformGDB \
+	lldbPluginProcessNetBSD \
+	lldbPluginProcessPOSIX \
+	lldbPluginProcessGDBRemote \
+	lldbPluginProcessMachCore \
+	lldbPluginDynamicLoaderDarwinKernel \
+	lldbPluginPlatformMacOSX \
+	lldbPluginPlatformPOSIX \
+	lldbPluginDynamicLoaderMacOSXDYLD \
+	lldbPluginObjectFileMachO \
+	lldbPluginProcessMinidump \
+	lldbPluginDynamicLoaderPosixDYLD \
+	lldbPluginProcessElfCore \
+	lldbPluginDynamicLoaderPosixDYLD \
+	lldbPluginProcessElfCore \
+	lldbPluginScriptInterpreterNone \
+	lldbPluginStructuredDataDarwinLog \
+	lldbPluginSymbolFileBreakpad \
+	lldbPluginObjectFileBreakpad \
+	lldbPluginSymbolFileSymtab \
+	lldbPluginSystemRuntimeMacOSX \
+	lldbPluginSymbolVendorELF \
+	lldbPluginObjectFileELF \
+	lldbPluginUnwindAssemblyInstEmulation \
+	lldbPluginUnwindAssemblyX86 \
+	lldbBreakpoint \
+	lldbCore \
+	lldbDataFormatters \
+	lldbExpression \
+	lldbInterpreter \
+	lldbSymbol \
+	lldbTarget \
+	lldbPluginExpressionParserClang \
+	lldbPluginClangCommon \
+	lldbPluginCPlusPlusLanguage \
+	lldbPluginObjCLanguage \
+	lldbPluginCPPRuntime \
+	lldbPluginObjCRuntime \
+	lldbPluginAppleObjCRuntime \
+	lldbPluginObjectFileJIT \
+	lldbPluginProcessUtility \
+	lldbPluginSymbolFileDWARF \
+	lldbPluginSymbolFileNativePDB \
+	lldbPluginSymbolFilePDB \
+	lldbCommands \
+	lldbBreakpoint \
+	lldbCore \
+	lldbDataFormatters \
+	lldbExpression \
+	lldbInterpreter \
+	lldbSymbol \
+	lldbTarget \
+	lldbPluginExpressionParserClang \
+	lldbPluginClangCommon \
+	lldbPluginCPlusPlusLanguage \
+	lldbPluginObjCLanguage \
+	lldbPluginCPPRuntime \
+	lldbPluginObjCRuntime \
+	lldbPluginAppleObjCRuntime \
+	lldbPluginObjectFileJIT \
+	lldbPluginProcessUtility \
+	lldbPluginSymbolFileDWARF \
+	lldbPluginSymbolFileNativePDB \
+	lldbPluginSymbolFilePDB \
+	lldbCommands \
+	lldbBreakpoint \
+	lldbCore \
+	lldbDataFormatters \
+	lldbExpression \
+	lldbInterpreter \
+	lldbSymbol \
+	lldbTarget \
+	lldbPluginExpressionParserClang \
+	lldbPluginClangCommon \
+	lldbPluginCPlusPlusLanguage \
+	lldbPluginObjCLanguage \
+	lldbPluginCPPRuntime \
+	lldbPluginObjCRuntime \
+	lldbPluginAppleObjCRuntime \
+	lldbPluginObjectFileJIT \
+	lldbPluginProcessUtility \
+	lldbPluginSymbolFileDWARF \
+	lldbPluginSymbolFileNativePDB \
+	lldbPluginSymbolFilePDB \
+	lldbCommands \
+	lldbBreakpoint \
+	lldbCore \
+	lldbDataFormatters \
+	lldbExpression \
+	lldbInterpreter \
+	lldbSymbol \
+	lldbTarget \
+	lldbPluginExpressionParserClang \
+	lldbPluginClangCommon \
+	lldbPluginCPlusPlusLanguage \
+	lldbPluginObjCLanguage \
+	lldbPluginCPPRuntime \
+	lldbPluginObjCRuntime \
+	lldbPluginAppleObjCRuntime \
+	lldbPluginObjectFileJIT \
+	lldbPluginProcessUtility \
+	lldbPluginSymbolFileDWARF \
+	lldbPluginSymbolFileNativePDB \
+	lldbPluginSymbolFilePDB \
+	lldbCommands \
+	lldbBase \
+	lldbHost \
+	lldbUtility
+
+CLANG_LIBS+= \
+	clangCodeGen \
+	clangFrontend \
+	clangDriver \
+	clangParse \
+	clangRewrite \
+	clangSerialization \
+	clangSema \
+	clangEdit \
+	clangAnalysis \
+	clangASTMatchers \
+	clangAST \
+	clangLex \
+	clangBasic
+
+LLVM_LIBS+= \
+	Option \
+	Support \
+	AArch64CodeGen \
+	AArch64AsmParser \
+	AArch64Disassembler \
+	AArch64MCTargetDesc \
+	AArch64TargetInfo \
+	AArch64Utils \
+	AMDGPUCodeGen \
+	MIRParser \
+	AMDGPUAsmParser \
+	AMDGPUDisassembler \
+	AMDGPUMCTargetDesc \
+	AMDGPUTargetInfo \
+	AMDGPUUtils \
+	ARMCodeGen \
+	ARMAsmParser \
+	ARMDisassembler \
+	ARMMCTargetDesc \
+	ARMTargetInfo \
+	ARMUtils \
+	PowerPCCodeGen \
+	PowerPCAsmParser \
+	PowerPCMCTargetDesc \
+	PowerPCDisassembler \
+	PowerPCTargetInfo \
+	SparcCodeGen \
+	SparcAsmParser \
+	SparcMCTargetDesc \
+	SparcDisassembler \
+	SparcTargetInfo \
+	X86CodeGen \
+	MipsCodeGen \
+	AsmPrinter \
+	GlobalISel \
+	SelectionDAG \
+	MipsAsmParser \
+	MipsMCTargetDesc \
+	MipsDisassembler \
+	MipsTargetInfo \
+	X86AsmParser \
+	X86MCTargetDesc \
+	X86Disassembler \
+	X86TargetInfo \
+	X86Utils \
+	MCJIT \
+	ExecutionEngine \
+	RuntimeDyld \
+	LTO \
+	Passes \
+	ipo \
+	IRReader \
+	AsmParser \
+	Linker \
+	CodeGen \
+	Target \
+	BitWriter \
+	ScalarOpts \
+	Vectorize \
+	InstCombine \
+	Instrumentation \
+	Analysis \
+	Option \
+	ProfileData \
+	ProfileDataCoverage \
+	DebugInfoDWARF \
+	DebugInfoPDB \
+	DebugInfoPDBNative \
+	Object \
+	BitReader \
+	IR \
+	Remarks \
+	BitstreamReader \
+	MCParser \
+	TextAPI \
+	MCDisassembler \
+	MC \
+	BinaryFormat \
+	DebugInfoCodeView \
+	DebugInfoMSF \
+	TransformsCFGuard \
+	TransformsUtils \
+	Support \
+	Demangle
+
+.include "${.PARSEDIR}/../../link.mk"
+
+LDADD+=	-lkvm -lutil -lz
+.if !defined(HOSTPROG)
+DPADD+=	${LIBKVM} ${LIBUTIL} ${LIBZ}
+.endif
+
+TABLEGEN_SRC= \
+	Options.td
+TABLEGEN_OUTPUT= \
+	Options.inc|-gen-opt-parser-defs
+TABLEGEN_INCLUDES= \
+	-I${LLDB_SRCDIR}/tools/driver
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.include <bsd.prog.mk>
diff --git a/external/apache2/llvm/config/lldb/Host/Config.h b/external/apache2/llvm/config/lldb/Host/Config.h
new file mode 100644
index 000000000000..d4089da73dc3
--- /dev/null
+++ b/external/apache2/llvm/config/lldb/Host/Config.h
@@ -0,0 +1,53 @@
+//===-- Config.h -----------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_HOST_CONFIG_H
+#define LLDB_HOST_CONFIG_H
+
+#define LLDB_EDITLINE_USE_WCHAR 1
+
+#define LLDB_HAVE_EL_RFUNC_T 0
+
+
+#define HAVE_SYS_TYPES_H 1
+
+#define HAVE_SYS_EVENT_H 1
+
+#define HAVE_PPOLL 0
+
+#define HAVE_SIGACTION 1
+
+#define HAVE_PROCESS_VM_READV 0
+
+#define HAVE_NR_PROCESS_VM_READV 0
+
+#ifndef HAVE_LIBCOMPRESSION
+/* #undef HAVE_LIBCOMPRESSION */
+#endif
+
+#define LLDB_ENABLE_POSIX 1
+
+#define LLDB_ENABLE_TERMIOS 1
+
+#define LLDB_ENABLE_LZMA 0
+
+#define LLDB_ENABLE_CURSES 0
+
+#define LLDB_ENABLE_LIBEDIT 0
+
+#define LLDB_ENABLE_LIBXML2 0
+
+#define LLDB_ENABLE_LUA 0
+
+#define LLDB_ENABLE_PYTHON 0
+
+/* #undef LLDB_PYTHON_HOME */
+
+#define LLDB_LIBDIR_SUFFIX ""
+
+#endif // #ifndef LLDB_HOST_CONFIG_H
diff --git a/external/apache2/llvm/gen-lldb-makefiles.py b/external/apache2/llvm/gen-lldb-makefiles.py
new file mode 100755
index 000000000000..e74e3944be88
--- /dev/null
+++ b/external/apache2/llvm/gen-lldb-makefiles.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+
+import argparse
+import os
+import os.path
+import re
+import sys
+
+
+ADD_LIB_RE = re.compile(r'add_lldb_library\((\S+)\s(.*?)\)',
+                        re.IGNORECASE | re.DOTALL)
+START_RE = re.compile(r'\b(PLUGIN|SHARED)\b')
+EOL_RE = re.compile(r'\b(DEPENDS|LINK_LIBS|LINK_COMPONENTS)\b.*',
+                    re.DOTALL)
+
+
+def main():
+    argp = argparse.ArgumentParser()
+    argp.add_argument('lldb_source_dir', help='LLDB source/ path')
+    argp.add_argument('out_dir', help='Output src directory')
+    args = argp.parse_args()
+
+    assert os.path.exists(os.path.join(args.out_dir, 'build.sh'))
+    llvm_lib_dir = os.path.join(args.out_dir, 'external/apache2/llvm/lib')
+    tools_dir = os.path.join(args.out_dir, 'tools/llvm-lib')
+
+    for curdir, dirs, files in os.walk(args.lldb_source_dir):
+        if 'CMakeLists.txt' not in files:
+            continue
+        with open(os.path.join(curdir, 'CMakeLists.txt'), 'r') as f:
+            data = f.read()
+        for m in ADD_LIB_RE.finditer(data):
+            libname = m.group(1)
+            libpath = os.path.relpath(curdir, args.lldb_source_dir)
+            libfiles = EOL_RE.sub('', START_RE.sub('', m.group(2)))
+
+            sources = ''
+            for f in libfiles.split():
+                sources += f'\t{f} \\\n'
+            sources = sources[:-3]
+
+            tpath = os.path.join(tools_dir, 'lib' + libname)
+            os.makedirs(tpath, exist_ok=True)
+            with open(os.path.join(tpath, 'Makefile'), 'w') as f:
+                f.write('''#	$NetBSD$
+
+.include <bsd.init.mk>
+''')
+
+            tpath = os.path.join(llvm_lib_dir, 'lib' + libname)
+            os.makedirs(tpath, exist_ok=True)
+            with open(os.path.join(tpath, 'Makefile'), 'w') as f:
+                f.write(f'''#	$NetBSD$
+
+LIB=	{libname}
+
+.include <bsd.init.mk>
+
+.PATH: ${{LLDB_SRCDIR}}/source/{libpath}
+
+SRCS+= \\
+{sources}
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
+''')
+
+    return 0
+
+
+if __name__ == '__main__':
+    sys.exit(main())
diff --git a/external/apache2/llvm/lib/Makefile b/external/apache2/llvm/lib/Makefile
index c11d52017158..a4aecb156569 100644
--- a/external/apache2/llvm/lib/Makefile
+++ b/external/apache2/llvm/lib/Makefile
@@ -106,7 +106,8 @@ SUBDIR+= \
 	libLLVMX86TargetInfo \
 	libLLVMX86Utils
 
-.if ${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes"
+.if !defined(HOSTLIB) && !defined(_BSD_HOSTINIT_MK_)
+.if (${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes") || ${MKLLDB} != "no"
 SUBDIR+= \
 	libLLVMAMDGPUDisassembler \
 	libLLVMExecutionEngine \
@@ -116,7 +117,7 @@ SUBDIR+= \
 	libLLVMRuntimeDyld
 .endif
 
-.if ${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes"
+.if (${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes") || ${MKLLDB} != "no"
 SUBDIR+= \
 	libLLVMDebugInfoPDB \
 	libLLVMDebugInfoPDBNative \
@@ -134,6 +135,7 @@ SUBDIR+= \
 	libLLVMToolDriversDlltool \
 	libLLVMXRay
 .endif
+.endif
 
 SUBDIR+= \
 	libclangAnalysis \
@@ -171,4 +173,103 @@ SUBDIR+= \
 	libclangToolingSyntax
 .endif
 
+.if ${MKLLDB} != "no" && !defined(HOSTLIB) && !defined(_BSD_HOSTINIT_MK_)
+SUBDIR+= \
+	liblldbBase \
+	liblldbBreakpoint \
+	liblldbCommands \
+	liblldbCore \
+	liblldbDataFormatters \
+	liblldbExpression \
+	liblldbHost \
+	liblldbInitialization \
+	liblldbInterpreter \
+	liblldbPluginABIMacOSX_arm \
+	liblldbPluginABIMacOSX_arm64 \
+	liblldbPluginABIMacOSX_i386 \
+	liblldbPluginABISysV_arc \
+	liblldbPluginABISysV_arm \
+	liblldbPluginABISysV_arm64 \
+	liblldbPluginABISysV_hexagon \
+	liblldbPluginABISysV_i386 \
+	liblldbPluginABISysV_mips \
+	liblldbPluginABISysV_mips64 \
+	liblldbPluginABISysV_ppc \
+	liblldbPluginABISysV_ppc64 \
+	liblldbPluginABISysV_s390x \
+	liblldbPluginABISysV_x86_64 \
+	liblldbPluginABIWindows_x86_64 \
+	liblldbPluginAppleObjCRuntime \
+	liblldbPluginArchitectureArm \
+	liblldbPluginArchitectureMips \
+	liblldbPluginArchitecturePPC64 \
+	liblldbPluginClangCommon \
+	liblldbPluginCPlusPlusLanguage \
+	liblldbPluginCPPRuntime \
+	liblldbPluginCXXItaniumABI \
+	liblldbPluginDisassemblerLLVM \
+	liblldbPluginDynamicLoaderDarwinKernel \
+	liblldbPluginDynamicLoaderHexagonDYLD \
+	liblldbPluginDynamicLoaderMacOSXDYLD \
+	liblldbPluginDynamicLoaderPosixDYLD \
+	liblldbPluginDynamicLoaderStatic \
+	liblldbPluginDynamicLoaderWindowsDYLD \
+	liblldbPluginExpressionParserClang \
+	liblldbPluginInstructionARM \
+	liblldbPluginInstructionARM64 \
+	liblldbPluginInstructionMIPS \
+	liblldbPluginInstructionMIPS64 \
+	liblldbPluginInstructionPPC64 \
+	liblldbPluginInstrumentationRuntimeASan \
+	liblldbPluginInstrumentationRuntimeMainThreadChecker \
+	liblldbPluginInstrumentationRuntimeTSan \
+	liblldbPluginInstrumentationRuntimeUBSan \
+	liblldbPluginJITLoaderGDB \
+	liblldbPluginMemoryHistoryASan \
+	liblldbPluginObjCLanguage \
+	liblldbPluginObjCPlusPlusLanguage \
+	liblldbPluginObjCRuntime \
+	liblldbPluginObjectContainerBSDArchive \
+	liblldbPluginObjectContainerMachOArchive \
+	liblldbPluginObjectFileBreakpad \
+	liblldbPluginObjectFileELF \
+	liblldbPluginObjectFileJIT \
+	liblldbPluginObjectFileMachO \
+	liblldbPluginObjectFilePECOFF \
+	liblldbPluginOSPython \
+	liblldbPluginPlatformAndroid \
+	liblldbPluginPlatformFreeBSD \
+	liblldbPluginPlatformGDB \
+	liblldbPluginPlatformLinux \
+	liblldbPluginPlatformMacOSX \
+	liblldbPluginPlatformNetBSD \
+	liblldbPluginPlatformOpenBSD \
+	liblldbPluginPlatformPOSIX \
+	liblldbPluginPlatformWindows \
+	liblldbPluginProcessElfCore \
+	liblldbPluginProcessGDBRemote \
+	liblldbPluginProcessMachCore \
+	liblldbPluginProcessMinidump \
+	liblldbPluginProcessNetBSD \
+	liblldbPluginProcessPOSIX \
+	liblldbPluginProcessUtility \
+	liblldbPluginRenderScriptRuntime \
+	liblldbPluginScriptInterpreterNone \
+	liblldbPluginStructuredDataDarwinLog \
+	liblldbPluginSymbolFileBreakpad \
+	liblldbPluginSymbolFileDWARF \
+	liblldbPluginSymbolFileNativePDB \
+	liblldbPluginSymbolFilePDB \
+	liblldbPluginSymbolFileSymtab \
+	liblldbPluginSymbolVendorELF \
+	liblldbPluginSymbolVendorMacOSX \
+	liblldbPluginSystemRuntimeMacOSX \
+	liblldbPluginUnwindAssemblyInstEmulation \
+	liblldbPluginUnwindAssemblyX86 \
+	liblldbSymbol \
+	liblldbTarget \
+	liblldbUtility \
+	liblldb
+.endif
+
 .include <bsd.subdir.mk>
diff --git a/external/apache2/llvm/lib/liblldb/Makefile b/external/apache2/llvm/lib/liblldb/Makefile
new file mode 100644
index 000000000000..bdf97c8ac5a1
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldb/Makefile
@@ -0,0 +1,88 @@
+#	$NetBSD$
+
+LIB=		lldb
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/API
+
+CPPFLAGS+= \
+	-DLLDB_DISABLE_CURSES \
+	-DLLDB_DISABLE_PYTHON
+
+SRCS+= \
+	SBAddress.cpp \
+	SBAttachInfo.cpp \
+	SBBlock.cpp \
+	SBBreakpoint.cpp \
+	SBBreakpointLocation.cpp \
+	SBBreakpointName.cpp \
+	SBBreakpointOptionCommon.cpp \
+	SBBroadcaster.cpp \
+	SBCommandInterpreter.cpp \
+	SBCommandReturnObject.cpp \
+	SBCommunication.cpp \
+	SBCompileUnit.cpp \
+	SBData.cpp \
+	SBDebugger.cpp \
+	SBDeclaration.cpp \
+	SBError.cpp \
+	SBEvent.cpp \
+	SBExecutionContext.cpp \
+	SBExpressionOptions.cpp \
+	SBFileSpec.cpp \
+	SBFile.cpp \
+	SBFileSpecList.cpp \
+	SBFrame.cpp \
+	SBFunction.cpp \
+	SBHostOS.cpp \
+	SBInstruction.cpp \
+	SBInstructionList.cpp \
+	SBLanguageRuntime.cpp \
+	SBLaunchInfo.cpp \
+	SBLineEntry.cpp \
+	SBListener.cpp \
+	SBMemoryRegionInfo.cpp \
+	SBMemoryRegionInfoList.cpp \
+	SBModule.cpp \
+	SBModuleSpec.cpp \
+	SBPlatform.cpp \
+	SBProcess.cpp \
+	SBProcessInfo.cpp \
+	SBQueue.cpp \
+	SBQueueItem.cpp \
+	SBReproducer.cpp \
+	SBSection.cpp \
+	SBSourceManager.cpp \
+	SBStream.cpp \
+	SBStringList.cpp \
+	SBStructuredData.cpp \
+	SBSymbol.cpp \
+	SBSymbolContext.cpp \
+	SBSymbolContextList.cpp \
+	SBTarget.cpp \
+	SBThread.cpp \
+	SBThreadCollection.cpp \
+	SBThreadPlan.cpp \
+	SBTrace.cpp \
+	SBTraceOptions.cpp \
+	SBType.cpp \
+	SBTypeCategory.cpp \
+	SBTypeEnumMember.cpp \
+	SBTypeFilter.cpp \
+	SBTypeFormat.cpp \
+	SBTypeNameSpecifier.cpp \
+	SBTypeSummary.cpp \
+	SBTypeSynthetic.cpp \
+	SBValue.cpp \
+	SBValueList.cpp \
+	SBVariablesOptions.cpp \
+	SBWatchpoint.cpp \
+	SBUnixSignals.cpp \
+	SystemInitializerFull.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbBase/Makefile b/external/apache2/llvm/lib/liblldbBase/Makefile
new file mode 100644
index 000000000000..e4724422e235
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbBase/Makefile
@@ -0,0 +1,19 @@
+#	$NetBSD$
+
+LIB=	lldbBase
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source
+
+CPPFLAGS+= \
+	-DLLDB_REVISION=\"${LLDB_REVISION}\"
+
+SRCS+= \
+	lldb.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbBreakpoint/Makefile b/external/apache2/llvm/lib/liblldbBreakpoint/Makefile
new file mode 100644
index 000000000000..5725a36496ae
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbBreakpoint/Makefile
@@ -0,0 +1,39 @@
+#	$NetBSD$
+
+LIB=	lldbBreakpoint
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Breakpoint
+
+SRCS+= \
+	Breakpoint.cpp \
+	BreakpointID.cpp \
+	BreakpointIDList.cpp \
+	BreakpointList.cpp \
+	BreakpointLocation.cpp \
+	BreakpointLocationCollection.cpp \
+	BreakpointLocationList.cpp \
+	BreakpointName.cpp \
+	BreakpointOptions.cpp \
+	BreakpointPrecondition.cpp \
+	BreakpointResolver.cpp \
+	BreakpointResolverAddress.cpp \
+	BreakpointResolverFileLine.cpp \
+	BreakpointResolverFileRegex.cpp \
+	BreakpointResolverName.cpp \
+	BreakpointResolverScripted.cpp \
+	BreakpointSite.cpp \
+	BreakpointSiteList.cpp \
+	Stoppoint.cpp \
+	StoppointCallbackContext.cpp \
+	StoppointLocation.cpp \
+	Watchpoint.cpp \
+	WatchpointList.cpp \
+	WatchpointOptions.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbCommands/Makefile b/external/apache2/llvm/lib/liblldbCommands/Makefile
new file mode 100644
index 000000000000..fb036fb631ff
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbCommands/Makefile
@@ -0,0 +1,57 @@
+#	$NetBSD$
+
+LIB=	lldbCommands
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Commands
+
+CPPFLAGS+= \
+	-DLLDB_DISABLE_CURSES \
+	-DLLDB_DISABLE_PYTHON
+
+SRCS+= \
+	CommandCompletions.cpp \
+	CommandObjectApropos.cpp \
+	CommandObjectBreakpoint.cpp \
+	CommandObjectBreakpointCommand.cpp \
+	CommandObjectCommands.cpp \
+	CommandObjectDisassemble.cpp \
+	CommandObjectExpression.cpp \
+	CommandObjectFrame.cpp \
+	CommandObjectGUI.cpp \
+	CommandObjectHelp.cpp \
+	CommandObjectLog.cpp \
+	CommandObjectMemory.cpp \
+	CommandObjectMultiword.cpp \
+	CommandObjectPlatform.cpp \
+	CommandObjectPlugin.cpp \
+	CommandObjectProcess.cpp \
+	CommandObjectQuit.cpp \
+	CommandObjectRegister.cpp \
+	CommandObjectReproducer.cpp \
+	CommandObjectSettings.cpp \
+	CommandObjectSource.cpp \
+	CommandObjectStats.cpp \
+	CommandObjectTarget.cpp \
+	CommandObjectThread.cpp \
+	CommandObjectType.cpp \
+	CommandObjectVersion.cpp \
+	CommandObjectWatchpoint.cpp \
+	CommandObjectWatchpointCommand.cpp \
+	CommandObjectLanguage.cpp
+
+LLDB_TABLEGEN_SRC= \
+	Options.td
+LLDB_TABLEGEN_OUTPUT= \
+	CommandOptions.inc|-gen-lldb-option-defs
+LLDB_TABLEGEN_INCLUDES= \
+	-I${LLDB_SRCDIR}/source/Commands
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbCore/Makefile b/external/apache2/llvm/lib/liblldbCore/Makefile
new file mode 100644
index 000000000000..b2f938dd972e
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbCore/Makefile
@@ -0,0 +1,74 @@
+#	$NetBSD$
+
+LIB=	lldbCore
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Core
+
+CPPFLAGS+= \
+	-DLLDB_DISABLE_CURSES \
+	-DLLDB_DISABLE_LIBEDIT \
+	-DLLDB_DISABLE_PYTHON
+
+SRCS+= \
+	Address.cpp \
+	AddressRange.cpp \
+	AddressResolver.cpp \
+	AddressResolverFileLine.cpp \
+	AddressResolverName.cpp \
+	Communication.cpp \
+	Debugger.cpp \
+	Disassembler.cpp \
+	DumpDataExtractor.cpp \
+	DumpRegisterValue.cpp \
+	DynamicLoader.cpp \
+	EmulateInstruction.cpp \
+	FileLineResolver.cpp \
+	FileSpecList.cpp \
+	FormatEntity.cpp \
+	Highlighter.cpp \
+	IOHandler.cpp \
+	Mangled.cpp \
+	Module.cpp \
+	ModuleChild.cpp \
+	ModuleList.cpp \
+	Opcode.cpp \
+	PluginManager.cpp \
+	RichManglingContext.cpp \
+	SearchFilter.cpp \
+	Section.cpp \
+	SourceManager.cpp \
+	StreamAsynchronousIO.cpp \
+	StreamFile.cpp \
+	UserSettingsController.cpp \
+	Value.cpp \
+	ValueObject.cpp \
+	ValueObjectCast.cpp \
+	ValueObjectChild.cpp \
+	ValueObjectConstResult.cpp \
+	ValueObjectConstResultCast.cpp \
+	ValueObjectConstResultChild.cpp \
+	ValueObjectConstResultImpl.cpp \
+	ValueObjectDynamicValue.cpp \
+	ValueObjectList.cpp \
+	ValueObjectMemory.cpp \
+	ValueObjectRegister.cpp \
+	ValueObjectSyntheticFilter.cpp \
+	ValueObjectVariable.cpp
+
+LLDB_TABLEGEN_SRC= \
+	CoreProperties.td
+LLDB_TABLEGEN_OUTPUT= \
+	CoreProperties.inc|-gen-lldb-property-defs \
+	CorePropertiesEnum.inc|-gen-lldb-property-enum-defs
+LLDB_TABLEGEN_INCLUDES= \
+	-I${LLDB_SRCDIR}/source/Core
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbDataFormatters/Makefile b/external/apache2/llvm/lib/liblldbDataFormatters/Makefile
new file mode 100644
index 000000000000..70409604b62b
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbDataFormatters/Makefile
@@ -0,0 +1,32 @@
+#	$NetBSD$
+
+LIB=	lldbDataFormatters
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/DataFormatters
+
+SRCS+= \
+	CXXFunctionPointer.cpp \
+	DataVisualization.cpp \
+	DumpValueObjectOptions.cpp \
+	FormatCache.cpp \
+	FormatClasses.cpp \
+	FormatManager.cpp \
+	FormattersHelpers.cpp \
+	LanguageCategory.cpp \
+	StringPrinter.cpp \
+	TypeCategory.cpp \
+	TypeCategoryMap.cpp \
+	TypeFormat.cpp \
+	TypeSummary.cpp \
+	TypeSynthetic.cpp \
+	TypeValidator.cpp \
+	ValueObjectPrinter.cpp \
+	VectorType.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbExpression/Makefile b/external/apache2/llvm/lib/liblldbExpression/Makefile
new file mode 100644
index 000000000000..679de46e8094
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbExpression/Makefile
@@ -0,0 +1,28 @@
+#	$NetBSD$
+
+LIB=	lldbExpression
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Expression
+
+SRCS+= \
+	DiagnosticManager.cpp \
+	DWARFExpression.cpp \
+	Expression.cpp \
+	ExpressionVariable.cpp \
+	FunctionCaller.cpp \
+	IRExecutionUnit.cpp \
+	IRInterpreter.cpp \
+	IRMemoryMap.cpp \
+	LLVMUserExpression.cpp \
+	Materializer.cpp \
+	REPL.cpp \
+	UserExpression.cpp \
+	UtilityFunction.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbHost/Makefile b/external/apache2/llvm/lib/liblldbHost/Makefile
new file mode 100644
index 000000000000..31ed2a2ca1ab
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbHost/Makefile
@@ -0,0 +1,69 @@
+#	$NetBSD$
+
+LIB=	lldbHost
+
+.include <bsd.init.mk>
+
+CPPFLAGS+= \
+	-DLLDB_DISABLE_LIBEDIT
+
+.PATH: ${LLDB_SRCDIR}/source/Host/common
+
+SRCS+= \
+	FileAction.cpp \
+	FileCache.cpp \
+	File.cpp \
+	FileSystem.cpp \
+	GetOptInc.cpp \
+	Host.cpp \
+	HostInfoBase.cpp \
+	HostNativeThreadBase.cpp \
+	HostProcess.cpp \
+	HostThread.cpp \
+	LockFileBase.cpp \
+	LZMA.cpp \
+	MainLoop.cpp \
+	MonitoringProcessLauncher.cpp \
+	NativeProcessProtocol.cpp \
+	NativeRegisterContext.cpp \
+	NativeThreadProtocol.cpp \
+	NativeWatchpointList.cpp \
+	OptionParser.cpp \
+	PipeBase.cpp \
+	ProcessLaunchInfo.cpp \
+	ProcessRunLock.cpp \
+	PseudoTerminal.cpp \
+	SocketAddress.cpp \
+	Socket.cpp \
+	StringConvert.cpp \
+	TaskPool.cpp \
+	TCPSocket.cpp \
+	Terminal.cpp \
+	ThreadLauncher.cpp \
+	UDPSocket.cpp \
+	XML.cpp
+
+.PATH: ${LLDB_SRCDIR}/source/Host/posix
+
+SRCS+= \
+	ConnectionFileDescriptorPosix.cpp \
+	DomainSocket.cpp \
+	FileSystemPosix.cpp \
+	HostInfoPosix.cpp \
+	HostProcessPosix.cpp \
+	HostThreadPosix.cpp \
+	LockFilePosix.cpp \
+	PipePosix.cpp \
+	ProcessLauncherPosixFork.cpp
+
+.PATH: ${LLDB_SRCDIR}/source/Host/netbsd
+
+SRCS+= \
+	HostNetBSD.cpp \
+	HostInfoNetBSD.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbInitialization/Makefile b/external/apache2/llvm/lib/liblldbInitialization/Makefile
new file mode 100644
index 000000000000..7b458019d3fe
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbInitialization/Makefile
@@ -0,0 +1,18 @@
+#	$NetBSD$
+
+LIB=	lldbInitialization
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Initialization
+
+SRCS+= \
+	SystemInitializerCommon.cpp \
+	SystemInitializer.cpp \
+	SystemLifetimeManager.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbInterpreter/Makefile b/external/apache2/llvm/lib/liblldbInterpreter/Makefile
new file mode 100644
index 000000000000..59a8b411222e
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbInterpreter/Makefile
@@ -0,0 +1,74 @@
+#	$NetBSD$
+
+LIB=	lldbInterpreter
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Interpreter
+
+CPPFLAGS+= \
+	-DLLDB_DISABLE_LIBEDIT \
+	-DLLDB_DISABLE_PYTHON
+
+SRCS+= \
+	CommandAlias.cpp \
+	CommandHistory.cpp \
+	CommandInterpreter.cpp \
+	CommandObject.cpp \
+	CommandObjectRegexCommand.cpp \
+	CommandObjectScript.cpp \
+	CommandOptionValidators.cpp \
+	CommandReturnObject.cpp \
+	OptionArgParser.cpp \
+	OptionGroupArchitecture.cpp \
+	OptionGroupBoolean.cpp \
+	OptionGroupFile.cpp \
+	OptionGroupFormat.cpp \
+	OptionGroupPythonClassWithDict.cpp \
+	OptionGroupOutputFile.cpp \
+	OptionGroupPlatform.cpp \
+	OptionGroupString.cpp \
+	OptionGroupUInt64.cpp \
+	OptionGroupUUID.cpp \
+	OptionGroupValueObjectDisplay.cpp \
+	OptionValue.cpp \
+	OptionValueArch.cpp \
+	OptionValueArgs.cpp \
+	OptionValueArray.cpp \
+	OptionValueBoolean.cpp \
+	OptionValueChar.cpp \
+	OptionValueDictionary.cpp \
+	OptionValueEnumeration.cpp \
+	OptionValueFileSpec.cpp \
+	OptionValueFileSpecList.cpp \
+	OptionValueFormat.cpp \
+	OptionValueFormatEntity.cpp \
+	OptionValueLanguage.cpp \
+	OptionValuePathMappings.cpp \
+	OptionValueProperties.cpp \
+	OptionValueRegex.cpp \
+	OptionValueSInt64.cpp \
+	OptionValueString.cpp \
+	OptionValueUInt64.cpp \
+	OptionValueUUID.cpp \
+	OptionGroupVariable.cpp \
+	OptionGroupWatchpoint.cpp \
+	Options.cpp \
+	Property.cpp \
+	ScriptInterpreter.cpp
+
+LLDB_TABLEGEN_SRC= \
+	InterpreterProperties.td
+LLDB_TABLEGEN_OUTPUT= \
+	InterpreterProperties.inc|-gen-lldb-property-defs \
+	InterpreterPropertiesEnum.inc|-gen-lldb-property-enum-defs
+LLDB_TABLEGEN_INCLUDES= \
+	-I${LLDB_SRCDIR}/source/Interpreter
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABIMacOSX_arm/Makefile b/external/apache2/llvm/lib/liblldbPluginABIMacOSX_arm/Makefile
new file mode 100644
index 000000000000..4ec5623dfda1
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABIMacOSX_arm/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABIMacOSX_arm
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/MacOSX-arm
+
+SRCS+= \
+	ABIMacOSX_arm.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABIMacOSX_arm64/Makefile b/external/apache2/llvm/lib/liblldbPluginABIMacOSX_arm64/Makefile
new file mode 100644
index 000000000000..05b31324f5b2
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABIMacOSX_arm64/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABIMacOSX_arm64
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/MacOSX-arm64
+
+SRCS+= \
+	ABIMacOSX_arm64.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABIMacOSX_i386/Makefile b/external/apache2/llvm/lib/liblldbPluginABIMacOSX_i386/Makefile
new file mode 100644
index 000000000000..369383ebb346
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABIMacOSX_i386/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABIMacOSX_i386
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/MacOSX-i386
+
+SRCS+= \
+	ABIMacOSX_i386.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABISysV_arc/Makefile b/external/apache2/llvm/lib/liblldbPluginABISysV_arc/Makefile
new file mode 100644
index 000000000000..110de12633ac
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABISysV_arc/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABISysV_arc
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/SysV-arc
+
+SRCS+= \
+	ABISysV_arc.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABISysV_arm/Makefile b/external/apache2/llvm/lib/liblldbPluginABISysV_arm/Makefile
new file mode 100644
index 000000000000..896e560eacbb
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABISysV_arm/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABISysV_arm
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/SysV-arm
+
+SRCS+= \
+	ABISysV_arm.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABISysV_arm64/Makefile b/external/apache2/llvm/lib/liblldbPluginABISysV_arm64/Makefile
new file mode 100644
index 000000000000..d291b65afbc9
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABISysV_arm64/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABISysV_arm64
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/SysV-arm64
+
+SRCS+= \
+	ABISysV_arm64.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABISysV_hexagon/Makefile b/external/apache2/llvm/lib/liblldbPluginABISysV_hexagon/Makefile
new file mode 100644
index 000000000000..b23eb101f729
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABISysV_hexagon/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABISysV_hexagon
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/SysV-hexagon
+
+SRCS+= \
+	ABISysV_hexagon.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABISysV_i386/Makefile b/external/apache2/llvm/lib/liblldbPluginABISysV_i386/Makefile
new file mode 100644
index 000000000000..bba064377412
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABISysV_i386/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABISysV_i386
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/SysV-i386
+
+SRCS+= \
+	ABISysV_i386.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABISysV_mips/Makefile b/external/apache2/llvm/lib/liblldbPluginABISysV_mips/Makefile
new file mode 100644
index 000000000000..7a3d6b122608
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABISysV_mips/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABISysV_mips
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/SysV-mips
+
+SRCS+= \
+	ABISysV_mips.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABISysV_mips64/Makefile b/external/apache2/llvm/lib/liblldbPluginABISysV_mips64/Makefile
new file mode 100644
index 000000000000..a6983df5c688
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABISysV_mips64/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABISysV_mips64
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/SysV-mips64
+
+SRCS+= \
+	ABISysV_mips64.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABISysV_ppc/Makefile b/external/apache2/llvm/lib/liblldbPluginABISysV_ppc/Makefile
new file mode 100644
index 000000000000..c5d86c7ab8a4
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABISysV_ppc/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABISysV_ppc
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/SysV-ppc
+
+SRCS+= \
+	ABISysV_ppc.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABISysV_ppc64/Makefile b/external/apache2/llvm/lib/liblldbPluginABISysV_ppc64/Makefile
new file mode 100644
index 000000000000..e331db8d8e5a
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABISysV_ppc64/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABISysV_ppc64
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/SysV-ppc64
+
+SRCS+= \
+	ABISysV_ppc64.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABISysV_s390x/Makefile b/external/apache2/llvm/lib/liblldbPluginABISysV_s390x/Makefile
new file mode 100644
index 000000000000..928bc52faa1b
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABISysV_s390x/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABISysV_s390x
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/SysV-s390x
+
+SRCS+= \
+	ABISysV_s390x.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABISysV_x86_64/Makefile b/external/apache2/llvm/lib/liblldbPluginABISysV_x86_64/Makefile
new file mode 100644
index 000000000000..2fb2b7c03ca5
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABISysV_x86_64/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABISysV_x86_64
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/SysV-x86_64
+
+SRCS+= \
+	ABISysV_x86_64.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginABIWindows_x86_64/Makefile b/external/apache2/llvm/lib/liblldbPluginABIWindows_x86_64/Makefile
new file mode 100644
index 000000000000..4537075bd158
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginABIWindows_x86_64/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginABIWindows_x86_64
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ABI/Windows-x86_64
+
+SRCS+= \
+	ABIWindows_x86_64.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginAppleObjCRuntime/Makefile b/external/apache2/llvm/lib/liblldbPluginAppleObjCRuntime/Makefile
new file mode 100644
index 000000000000..186b91f15dbf
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginAppleObjCRuntime/Makefile
@@ -0,0 +1,23 @@
+#	$NetBSD$
+
+LIB=	lldbPluginAppleObjCRuntime
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime
+
+SRCS+= \
+	AppleObjCRuntime.cpp \
+	AppleObjCRuntimeV1.cpp \
+	AppleObjCRuntimeV2.cpp \
+	AppleObjCTrampolineHandler.cpp \
+	AppleObjCDeclVendor.cpp \
+	AppleThreadPlanStepThroughObjCTrampoline.cpp \
+	AppleObjCClassDescriptorV2.cpp \
+	AppleObjCTypeEncodingParser.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginArchitectureArm/Makefile b/external/apache2/llvm/lib/liblldbPluginArchitectureArm/Makefile
new file mode 100644
index 000000000000..3c38d20e957a
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginArchitectureArm/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginArchitectureArm
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Architecture/Arm
+
+SRCS+= \
+	ArchitectureArm.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginArchitectureMips/Makefile b/external/apache2/llvm/lib/liblldbPluginArchitectureMips/Makefile
new file mode 100644
index 000000000000..1f7bedf43bbb
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginArchitectureMips/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginArchitectureMips
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Architecture/Mips
+
+SRCS+= \
+	ArchitectureMips.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginArchitecturePPC64/Makefile b/external/apache2/llvm/lib/liblldbPluginArchitecturePPC64/Makefile
new file mode 100644
index 000000000000..70cd2695affa
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginArchitecturePPC64/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginArchitecturePPC64
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Architecture/PPC64
+
+SRCS+= \
+	ArchitecturePPC64.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginCPPRuntime/Makefile b/external/apache2/llvm/lib/liblldbPluginCPPRuntime/Makefile
new file mode 100644
index 000000000000..5fef0519c8fc
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginCPPRuntime/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginCPPRuntime
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/LanguageRuntime/CPlusPlus
+
+SRCS+= \
+	CPPLanguageRuntime.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginCPlusPlusLanguage/Makefile b/external/apache2/llvm/lib/liblldbPluginCPlusPlusLanguage/Makefile
new file mode 100644
index 000000000000..49f9e29b76f0
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginCPlusPlusLanguage/Makefile
@@ -0,0 +1,35 @@
+#	$NetBSD$
+
+LIB=	lldbPluginCPlusPlusLanguage
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Language/CPlusPlus
+
+SRCS+= \
+	BlockPointer.cpp \
+	CPlusPlusLanguage.cpp \
+	CPlusPlusNameParser.cpp \
+	CxxStringTypes.cpp \
+	LibCxx.cpp \
+	LibCxxAtomic.cpp \
+	LibCxxBitset.cpp \
+	LibCxxInitializerList.cpp \
+	LibCxxList.cpp \
+	LibCxxMap.cpp \
+	LibCxxOptional.cpp \
+	LibCxxQueue.cpp \
+	LibCxxTuple.cpp \
+	LibCxxUnorderedMap.cpp \
+	LibCxxVariant.cpp \
+	LibCxxVector.cpp \
+	LibStdcpp.cpp \
+	LibStdcppTuple.cpp \
+	LibStdcppUniquePointer.cpp \
+	MSVCUndecoratedNameParser.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginCXXItaniumABI/Makefile b/external/apache2/llvm/lib/liblldbPluginCXXItaniumABI/Makefile
new file mode 100644
index 000000000000..e20274fffaec
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginCXXItaniumABI/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginCXXItaniumABI
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI
+
+SRCS+= \
+	ItaniumABILanguageRuntime.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginClangCommon/Makefile b/external/apache2/llvm/lib/liblldbPluginClangCommon/Makefile
new file mode 100644
index 000000000000..48a245c1bb10
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginClangCommon/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginClangCommon
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Language/ClangCommon
+
+SRCS+= \
+	ClangHighlighter.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginDisassemblerLLVM/Makefile b/external/apache2/llvm/lib/liblldbPluginDisassemblerLLVM/Makefile
new file mode 100644
index 000000000000..286c8e0d8371
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginDisassemblerLLVM/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginDisassemblerLLVM
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Disassembler/llvm
+
+SRCS+= \
+	DisassemblerLLVMC.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginDynamicLoaderDarwinKernel/Makefile b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderDarwinKernel/Makefile
new file mode 100644
index 000000000000..b101939c3931
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderDarwinKernel/Makefile
@@ -0,0 +1,26 @@
+#	$NetBSD$
+
+LIB=	lldbPluginDynamicLoaderDarwinKernel
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/DynamicLoader/Darwin-Kernel
+
+SRCS+= \
+	DynamicLoaderDarwinKernel.cpp
+
+LLDB_TABLEGEN_SRC= \
+	DynamicLoaderDarwinKernelProperties.td
+LLDB_TABLEGEN_OUTPUT= \
+	DynamicLoaderDarwinKernelProperties.inc|-gen-lldb-property-defs \
+	DynamicLoaderDarwinKernelPropertiesEnum.inc|-gen-lldb-property-enum-defs
+LLDB_TABLEGEN_INCLUDES= \
+	-I${LLDB_SRCDIR}/source/Plugins/DynamicLoader/Darwin-Kernel
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginDynamicLoaderHexagonDYLD/Makefile b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderHexagonDYLD/Makefile
new file mode 100644
index 000000000000..4732ab563cbe
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderHexagonDYLD/Makefile
@@ -0,0 +1,17 @@
+#	$NetBSD$
+
+LIB=	lldbPluginDynamicLoaderHexagonDYLD
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/DynamicLoader/Hexagon-DYLD
+
+SRCS+= \
+	HexagonDYLDRendezvous.cpp \
+	DynamicLoaderHexagonDYLD.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginDynamicLoaderMacOSXDYLD/Makefile b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderMacOSXDYLD/Makefile
new file mode 100644
index 000000000000..51eab545fdb5
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderMacOSXDYLD/Makefile
@@ -0,0 +1,18 @@
+#	$NetBSD$
+
+LIB=	lldbPluginDynamicLoaderMacOSXDYLD
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/DynamicLoader/MacOSX-DYLD
+
+SRCS+= \
+	DynamicLoaderMacOSXDYLD.cpp \
+	DynamicLoaderMacOS.cpp \
+	DynamicLoaderDarwin.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginDynamicLoaderPosixDYLD/Makefile b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderPosixDYLD/Makefile
new file mode 100644
index 000000000000..746d2ef5b006
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderPosixDYLD/Makefile
@@ -0,0 +1,17 @@
+#	$NetBSD$
+
+LIB=	lldbPluginDynamicLoaderPosixDYLD
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/DynamicLoader/POSIX-DYLD
+
+SRCS+= \
+	DYLDRendezvous.cpp \
+	DynamicLoaderPOSIXDYLD.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginDynamicLoaderStatic/Makefile b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderStatic/Makefile
new file mode 100644
index 000000000000..0c8dc799466f
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderStatic/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginDynamicLoaderStatic
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/DynamicLoader/Static
+
+SRCS+= \
+	DynamicLoaderStatic.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginDynamicLoaderWindowsDYLD/Makefile b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderWindowsDYLD/Makefile
new file mode 100644
index 000000000000..99e05732de31
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginDynamicLoaderWindowsDYLD/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginDynamicLoaderWindowsDYLD
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/DynamicLoader/Windows-DYLD
+
+SRCS+= \
+	DynamicLoaderWindowsDYLD.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginExpressionParserClang/Makefile b/external/apache2/llvm/lib/liblldbPluginExpressionParserClang/Makefile
new file mode 100644
index 000000000000..25efcecfc52a
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginExpressionParserClang/Makefile
@@ -0,0 +1,34 @@
+#	$NetBSD$
+
+LIB=	lldbPluginExpressionParserClang
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ExpressionParser/Clang
+
+SRCS+= \
+	ASTDumper.cpp \
+	ASTResultSynthesizer.cpp \
+	ASTStructExtractor.cpp \
+	ASTUtils.cpp \
+	ClangASTSource.cpp \
+	ClangDeclVendor.cpp \
+	ClangExpressionDeclMap.cpp \
+	ClangExpressionParser.cpp \
+	ClangExpressionSourceCode.cpp \
+	ClangExpressionVariable.cpp \
+	ClangFunctionCaller.cpp \
+	ClangHost.cpp \
+	ClangModulesDeclVendor.cpp \
+	ClangPersistentVariables.cpp \
+	ClangUserExpression.cpp \
+	ClangUtilityFunction.cpp \
+	CppModuleConfiguration.cpp \
+	IRForTarget.cpp \
+	IRDynamicChecks.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginInstructionARM/Makefile b/external/apache2/llvm/lib/liblldbPluginInstructionARM/Makefile
new file mode 100644
index 000000000000..5eb86cf25541
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginInstructionARM/Makefile
@@ -0,0 +1,17 @@
+#	$NetBSD$
+
+LIB=	lldbPluginInstructionARM
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Instruction/ARM
+
+SRCS+= \
+	EmulateInstructionARM.cpp \
+	EmulationStateARM.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginInstructionARM64/Makefile b/external/apache2/llvm/lib/liblldbPluginInstructionARM64/Makefile
new file mode 100644
index 000000000000..020ad30a44cf
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginInstructionARM64/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginInstructionARM64
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Instruction/ARM64
+
+SRCS+= \
+	EmulateInstructionARM64.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginInstructionMIPS/Makefile b/external/apache2/llvm/lib/liblldbPluginInstructionMIPS/Makefile
new file mode 100644
index 000000000000..d14ce3f1b86e
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginInstructionMIPS/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginInstructionMIPS
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Instruction/MIPS
+
+SRCS+= \
+	EmulateInstructionMIPS.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginInstructionMIPS64/Makefile b/external/apache2/llvm/lib/liblldbPluginInstructionMIPS64/Makefile
new file mode 100644
index 000000000000..bc56be22a767
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginInstructionMIPS64/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginInstructionMIPS64
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Instruction/MIPS64
+
+SRCS+= \
+	EmulateInstructionMIPS64.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginInstructionPPC64/Makefile b/external/apache2/llvm/lib/liblldbPluginInstructionPPC64/Makefile
new file mode 100644
index 000000000000..fc295e425885
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginInstructionPPC64/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginInstructionPPC64
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Instruction/PPC64
+
+SRCS+= \
+	EmulateInstructionPPC64.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeASan/Makefile b/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeASan/Makefile
new file mode 100644
index 000000000000..1defd8264040
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeASan/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginInstrumentationRuntimeASan
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/InstrumentationRuntime/ASan
+
+SRCS+= \
+	ASanRuntime.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeMainThreadChecker/Makefile b/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeMainThreadChecker/Makefile
new file mode 100644
index 000000000000..7210ee18aac2
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeMainThreadChecker/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginInstrumentationRuntimeMainThreadChecker
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/InstrumentationRuntime/MainThreadChecker
+
+SRCS+= \
+	MainThreadCheckerRuntime.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeTSan/Makefile b/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeTSan/Makefile
new file mode 100644
index 000000000000..696d7dec8b83
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeTSan/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginInstrumentationRuntimeTSan
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/InstrumentationRuntime/TSan
+
+SRCS+= \
+	TSanRuntime.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeUBSan/Makefile b/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeUBSan/Makefile
new file mode 100644
index 000000000000..e31164f4af34
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginInstrumentationRuntimeUBSan/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginInstrumentationRuntimeUBSan
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/InstrumentationRuntime/UBSan
+
+SRCS+= \
+	UBSanRuntime.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginJITLoaderGDB/Makefile b/external/apache2/llvm/lib/liblldbPluginJITLoaderGDB/Makefile
new file mode 100644
index 000000000000..857bd17771c3
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginJITLoaderGDB/Makefile
@@ -0,0 +1,26 @@
+#	$NetBSD$
+
+LIB=	lldbPluginJITLoaderGDB
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/JITLoader/GDB
+
+SRCS+= \
+	JITLoaderGDB.cpp
+
+LLDB_TABLEGEN_SRC= \
+	JITLoaderGDBProperties.td
+LLDB_TABLEGEN_OUTPUT= \
+	JITLoaderGDBProperties.inc|-gen-lldb-property-defs \
+	JITLoaderGDBPropertiesEnum.inc|-gen-lldb-property-enum-defs
+LLDB_TABLEGEN_INCLUDES= \
+	-I${LLDB_SRCDIR}/source/Plugins/JITLoader/GDB
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginMemoryHistoryASan/Makefile b/external/apache2/llvm/lib/liblldbPluginMemoryHistoryASan/Makefile
new file mode 100644
index 000000000000..2d74ba60d423
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginMemoryHistoryASan/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginMemoryHistoryASan
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/MemoryHistory/asan
+
+SRCS+= \
+	MemoryHistoryASan.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginOSPython/Makefile b/external/apache2/llvm/lib/liblldbPluginOSPython/Makefile
new file mode 100644
index 000000000000..0f9173fdd58e
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginOSPython/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginOSPython
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/OperatingSystem/Python
+
+SRCS+= \
+	OperatingSystemPython.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginObjCLanguage/Makefile b/external/apache2/llvm/lib/liblldbPluginObjCLanguage/Makefile
new file mode 100644
index 000000000000..b7a5414f498f
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginObjCLanguage/Makefile
@@ -0,0 +1,26 @@
+#	$NetBSD$
+
+LIB=	lldbPluginObjCLanguage
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Language/ObjC
+
+SRCS+= \
+	ObjCLanguage.cpp \
+	CF.cpp \
+	Cocoa.cpp \
+	CoreMedia.cpp \
+	NSArray.cpp \
+	NSDictionary.cpp \
+	NSError.cpp \
+	NSException.cpp \
+	NSIndexPath.cpp \
+	NSSet.cpp \
+	NSString.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginObjCPlusPlusLanguage/Makefile b/external/apache2/llvm/lib/liblldbPluginObjCPlusPlusLanguage/Makefile
new file mode 100644
index 000000000000..9cf8bfdb8742
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginObjCPlusPlusLanguage/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginObjCPlusPlusLanguage
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Language/ObjCPlusPlus
+
+SRCS+= \
+	ObjCPlusPlusLanguage.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginObjCRuntime/Makefile b/external/apache2/llvm/lib/liblldbPluginObjCRuntime/Makefile
new file mode 100644
index 000000000000..924e3fcdeb2f
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginObjCRuntime/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginObjCRuntime
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/LanguageRuntime/ObjC
+
+SRCS+= \
+	ObjCLanguageRuntime.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginObjectContainerBSDArchive/Makefile b/external/apache2/llvm/lib/liblldbPluginObjectContainerBSDArchive/Makefile
new file mode 100644
index 000000000000..e9f25fbddfd1
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginObjectContainerBSDArchive/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginObjectContainerBSDArchive
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ObjectContainer/BSD-Archive
+
+SRCS+= \
+	ObjectContainerBSDArchive.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginObjectContainerMachOArchive/Makefile b/external/apache2/llvm/lib/liblldbPluginObjectContainerMachOArchive/Makefile
new file mode 100644
index 000000000000..43f499dc997d
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginObjectContainerMachOArchive/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginObjectContainerMachOArchive
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ObjectContainer/Universal-Mach-O
+
+SRCS+= \
+	ObjectContainerUniversalMachO.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginObjectFileBreakpad/Makefile b/external/apache2/llvm/lib/liblldbPluginObjectFileBreakpad/Makefile
new file mode 100644
index 000000000000..65e9e1a55e54
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginObjectFileBreakpad/Makefile
@@ -0,0 +1,17 @@
+#	$NetBSD$
+
+LIB=	lldbPluginObjectFileBreakpad
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ObjectFile/Breakpad
+
+SRCS+= \
+	BreakpadRecords.cpp \
+	ObjectFileBreakpad.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginObjectFileELF/Makefile b/external/apache2/llvm/lib/liblldbPluginObjectFileELF/Makefile
new file mode 100644
index 000000000000..2ebfec6615e8
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginObjectFileELF/Makefile
@@ -0,0 +1,17 @@
+#	$NetBSD$
+
+LIB=	lldbPluginObjectFileELF
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ObjectFile/ELF
+
+SRCS+= \
+	ELFHeader.cpp \
+	ObjectFileELF.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginObjectFileJIT/Makefile b/external/apache2/llvm/lib/liblldbPluginObjectFileJIT/Makefile
new file mode 100644
index 000000000000..c02f4ff7e550
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginObjectFileJIT/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginObjectFileJIT
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ObjectFile/JIT
+
+SRCS+= \
+	ObjectFileJIT.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginObjectFileMachO/Makefile b/external/apache2/llvm/lib/liblldbPluginObjectFileMachO/Makefile
new file mode 100644
index 000000000000..7c57cc93e9df
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginObjectFileMachO/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginObjectFileMachO
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ObjectFile/Mach-O
+
+SRCS+= \
+	ObjectFileMachO.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginObjectFilePECOFF/Makefile b/external/apache2/llvm/lib/liblldbPluginObjectFilePECOFF/Makefile
new file mode 100644
index 000000000000..a53df7be88e0
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginObjectFilePECOFF/Makefile
@@ -0,0 +1,18 @@
+#	$NetBSD$
+
+LIB=	lldbPluginObjectFilePECOFF
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ObjectFile/PECOFF
+
+SRCS+= \
+	ObjectFilePECOFF.cpp \
+	PECallFrameInfo.cpp \
+	WindowsMiniDump.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginPlatformAndroid/Makefile b/external/apache2/llvm/lib/liblldbPluginPlatformAndroid/Makefile
new file mode 100644
index 000000000000..f284b87383c6
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginPlatformAndroid/Makefile
@@ -0,0 +1,18 @@
+#	$NetBSD$
+
+LIB=	lldbPluginPlatformAndroid
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Platform/Android
+
+SRCS+= \
+	AdbClient.cpp \
+	PlatformAndroid.cpp \
+	PlatformAndroidRemoteGDBServer.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginPlatformFreeBSD/Makefile b/external/apache2/llvm/lib/liblldbPluginPlatformFreeBSD/Makefile
new file mode 100644
index 000000000000..c8febba013b9
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginPlatformFreeBSD/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginPlatformFreeBSD
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Platform/FreeBSD
+
+SRCS+= \
+	PlatformFreeBSD.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginPlatformGDB/Makefile b/external/apache2/llvm/lib/liblldbPluginPlatformGDB/Makefile
new file mode 100644
index 000000000000..0b48dafad8d4
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginPlatformGDB/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginPlatformGDB
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Platform/gdb-server
+
+SRCS+= \
+	PlatformRemoteGDBServer.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginPlatformLinux/Makefile b/external/apache2/llvm/lib/liblldbPluginPlatformLinux/Makefile
new file mode 100644
index 000000000000..7615da6554b5
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginPlatformLinux/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginPlatformLinux
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Platform/Linux
+
+SRCS+= \
+	PlatformLinux.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginPlatformMacOSX/Makefile b/external/apache2/llvm/lib/liblldbPluginPlatformMacOSX/Makefile
new file mode 100644
index 000000000000..a66f28d5a8d9
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginPlatformMacOSX/Makefile
@@ -0,0 +1,33 @@
+#	$NetBSD$
+
+LIB=	lldbPluginPlatformMacOSX
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Platform/MacOSX
+
+SRCS+= \
+	PlatformDarwin.cpp \
+	PlatformDarwinKernel.cpp \
+	PlatformMacOSX.cpp \
+	PlatformRemoteiOS.cpp \
+	PlatformRemoteAppleTV.cpp \
+	PlatformRemoteAppleWatch.cpp \
+	PlatformRemoteDarwinDevice.cpp \
+	PlatformRemoteAppleBridge.cpp
+
+LLDB_TABLEGEN_SRC= \
+	PlatformMacOSXProperties.td
+LLDB_TABLEGEN_OUTPUT= \
+	PlatformMacOSXProperties.inc|-gen-lldb-property-defs \
+	PlatformMacOSXPropertiesEnum.inc|-gen-lldb-property-enum-defs
+LLDB_TABLEGEN_INCLUDES= \
+	-I${LLDB_SRCDIR}/source/Plugins/Platform/MacOSX
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginPlatformNetBSD/Makefile b/external/apache2/llvm/lib/liblldbPluginPlatformNetBSD/Makefile
new file mode 100644
index 000000000000..c8629541fa01
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginPlatformNetBSD/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginPlatformNetBSD
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Platform/NetBSD
+
+SRCS+= \
+	PlatformNetBSD.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginPlatformOpenBSD/Makefile b/external/apache2/llvm/lib/liblldbPluginPlatformOpenBSD/Makefile
new file mode 100644
index 000000000000..0412f8208512
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginPlatformOpenBSD/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginPlatformOpenBSD
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Platform/OpenBSD
+
+SRCS+= \
+	PlatformOpenBSD.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginPlatformPOSIX/Makefile b/external/apache2/llvm/lib/liblldbPluginPlatformPOSIX/Makefile
new file mode 100644
index 000000000000..87f8a335f5ff
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginPlatformPOSIX/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginPlatformPOSIX
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Platform/POSIX
+
+SRCS+= \
+	PlatformPOSIX.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginPlatformWindows/Makefile b/external/apache2/llvm/lib/liblldbPluginPlatformWindows/Makefile
new file mode 100644
index 000000000000..c4c27bab4b18
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginPlatformWindows/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginPlatformWindows
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Platform/Windows
+
+SRCS+= \
+	PlatformWindows.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginProcessElfCore/Makefile b/external/apache2/llvm/lib/liblldbPluginProcessElfCore/Makefile
new file mode 100644
index 000000000000..187470a98711
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginProcessElfCore/Makefile
@@ -0,0 +1,25 @@
+#	$NetBSD$
+
+LIB=	lldbPluginProcessElfCore
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Process/elf-core
+
+SRCS+= \
+	ProcessElfCore.cpp \
+	ThreadElfCore.cpp \
+	RegisterContextPOSIXCore_arm.cpp \
+	RegisterContextPOSIXCore_arm64.cpp \
+	RegisterContextPOSIXCore_mips64.cpp \
+	RegisterContextPOSIXCore_powerpc.cpp \
+	RegisterContextPOSIXCore_ppc64le.cpp \
+	RegisterContextPOSIXCore_s390x.cpp \
+	RegisterContextPOSIXCore_x86_64.cpp \
+	RegisterUtilities.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginProcessGDBRemote/Makefile b/external/apache2/llvm/lib/liblldbPluginProcessGDBRemote/Makefile
new file mode 100644
index 000000000000..f17be1086db7
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginProcessGDBRemote/Makefile
@@ -0,0 +1,38 @@
+#	$NetBSD$
+
+LIB=	lldbPluginProcessGDBRemote
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Process/gdb-remote
+
+SRCS+= \
+	GDBRemoteClientBase.cpp \
+	GDBRemoteCommunication.cpp \
+	GDBRemoteCommunicationClient.cpp \
+	GDBRemoteCommunicationHistory.cpp \
+	GDBRemoteCommunicationReplayServer.cpp \
+	GDBRemoteCommunicationServer.cpp \
+	GDBRemoteCommunicationServerCommon.cpp \
+	GDBRemoteCommunicationServerLLGS.cpp \
+	GDBRemoteCommunicationServerPlatform.cpp \
+	GDBRemoteRegisterContext.cpp \
+	ProcessGDBRemote.cpp \
+	ProcessGDBRemoteLog.cpp \
+	ThreadGDBRemote.cpp
+
+LLDB_TABLEGEN_SRC= \
+	ProcessGDBRemoteProperties.td
+LLDB_TABLEGEN_OUTPUT= \
+	ProcessGDBRemoteProperties.inc|-gen-lldb-property-defs \
+	ProcessGDBRemotePropertiesEnum.inc|-gen-lldb-property-enum-defs
+LLDB_TABLEGEN_INCLUDES= \
+	-I${LLDB_SRCDIR}/source/Plugins/Process/gdb-remote
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginProcessMachCore/Makefile b/external/apache2/llvm/lib/liblldbPluginProcessMachCore/Makefile
new file mode 100644
index 000000000000..5601e5960ca1
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginProcessMachCore/Makefile
@@ -0,0 +1,17 @@
+#	$NetBSD$
+
+LIB=	lldbPluginProcessMachCore
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Process/mach-core
+
+SRCS+= \
+	ProcessMachCore.cpp \
+	ThreadMachCore.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginProcessMinidump/Makefile b/external/apache2/llvm/lib/liblldbPluginProcessMinidump/Makefile
new file mode 100644
index 000000000000..3330ebbcdfe4
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginProcessMinidump/Makefile
@@ -0,0 +1,23 @@
+#	$NetBSD$
+
+LIB=	lldbPluginProcessMinidump
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Process/minidump
+
+SRCS+= \
+	MinidumpTypes.cpp \
+	MinidumpParser.cpp \
+	RegisterContextMinidump_ARM.cpp \
+	RegisterContextMinidump_ARM64.cpp \
+	RegisterContextMinidump_x86_32.cpp \
+	RegisterContextMinidump_x86_64.cpp \
+	ProcessMinidump.cpp \
+	ThreadMinidump.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginProcessNetBSD/Makefile b/external/apache2/llvm/lib/liblldbPluginProcessNetBSD/Makefile
new file mode 100644
index 000000000000..a1a8c1402d36
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginProcessNetBSD/Makefile
@@ -0,0 +1,19 @@
+#	$NetBSD$
+
+LIB=	lldbPluginProcessNetBSD
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Process/NetBSD
+
+SRCS+= \
+	NativeProcessNetBSD.cpp \
+	NativeRegisterContextNetBSD.cpp \
+	NativeRegisterContextNetBSD_x86_64.cpp \
+	NativeThreadNetBSD.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginProcessPOSIX/Makefile b/external/apache2/llvm/lib/liblldbPluginProcessPOSIX/Makefile
new file mode 100644
index 000000000000..6b350528991f
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginProcessPOSIX/Makefile
@@ -0,0 +1,19 @@
+#	$NetBSD$
+
+LIB=	lldbPluginProcessPOSIX
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Process/POSIX
+
+SRCS+= \
+	CrashReason.cpp \
+	NativeProcessELF.cpp \
+	ProcessMessage.cpp \
+	ProcessPOSIXLog.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginProcessUtility/Makefile b/external/apache2/llvm/lib/liblldbPluginProcessUtility/Makefile
new file mode 100644
index 000000000000..f0d98d01682b
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginProcessUtility/Makefile
@@ -0,0 +1,69 @@
+#	$NetBSD$
+
+LIB=	lldbPluginProcessUtility
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/Process/Utility
+
+SRCS+= \
+	AuxVector.cpp \
+	DynamicRegisterInfo.cpp \
+	FreeBSDSignals.cpp \
+	GDBRemoteSignals.cpp \
+	HistoryThread.cpp \
+	HistoryUnwind.cpp \
+	InferiorCallPOSIX.cpp \
+	LinuxProcMaps.cpp \
+	LinuxSignals.cpp \
+	MipsLinuxSignals.cpp \
+	NativeRegisterContextRegisterInfo.cpp \
+	NetBSDSignals.cpp \
+	RegisterContextDarwin_arm.cpp \
+	RegisterContextDarwin_arm64.cpp \
+	RegisterContextDarwin_i386.cpp \
+	RegisterContextDarwin_x86_64.cpp \
+	RegisterContextDummy.cpp \
+	RegisterContextFreeBSD_i386.cpp \
+	RegisterContextFreeBSD_mips64.cpp \
+	RegisterContextFreeBSD_powerpc.cpp \
+	RegisterContextFreeBSD_x86_64.cpp \
+	RegisterContextHistory.cpp \
+	RegisterContextLinux_i386.cpp \
+	RegisterContextLinux_x86_64.cpp \
+	RegisterContextLinux_mips64.cpp \
+	RegisterContextLinux_mips.cpp \
+	RegisterContextLinux_s390x.cpp \
+	RegisterContextLLDB.cpp \
+	RegisterContextMacOSXFrameBackchain.cpp \
+	RegisterContextMach_arm.cpp \
+	RegisterContextMach_i386.cpp \
+	RegisterContextMach_x86_64.cpp \
+	RegisterContextMemory.cpp \
+	RegisterContextNetBSD_i386.cpp \
+	RegisterContextNetBSD_x86_64.cpp \
+	RegisterContextOpenBSD_i386.cpp \
+	RegisterContextOpenBSD_x86_64.cpp \
+	RegisterContextPOSIX_arm.cpp \
+	RegisterContextPOSIX_arm64.cpp \
+	RegisterContextPOSIX_mips64.cpp \
+	RegisterContextPOSIX_powerpc.cpp \
+	RegisterContextPOSIX_ppc64le.cpp \
+	RegisterContextPOSIX_s390x.cpp \
+	RegisterContextPOSIX_x86.cpp \
+	RegisterContextThreadMemory.cpp \
+	RegisterContextWindows_i386.cpp \
+	RegisterContextWindows_x86_64.cpp \
+	RegisterInfoPOSIX_arm.cpp \
+	RegisterInfoPOSIX_arm64.cpp \
+	RegisterInfoPOSIX_ppc64le.cpp \
+	StopInfoMachException.cpp \
+	ThreadMemory.cpp \
+	UnwindLLDB.cpp \
+	UnwindMacOSXFrameBackchain.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginRenderScriptRuntime/Makefile b/external/apache2/llvm/lib/liblldbPluginRenderScriptRuntime/Makefile
new file mode 100644
index 000000000000..90ad16964e9d
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginRenderScriptRuntime/Makefile
@@ -0,0 +1,19 @@
+#	$NetBSD$
+
+LIB=	lldbPluginRenderScriptRuntime
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime
+
+SRCS+= \
+	RenderScriptRuntime.cpp \
+	RenderScriptExpressionOpts.cpp \
+	RenderScriptx86ABIFixups.cpp \
+	RenderScriptScriptGroup.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginScriptInterpreterNone/Makefile b/external/apache2/llvm/lib/liblldbPluginScriptInterpreterNone/Makefile
new file mode 100644
index 000000000000..f5ca6e5a13eb
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginScriptInterpreterNone/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginScriptInterpreterNone
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/ScriptInterpreter/None
+
+SRCS+= \
+	ScriptInterpreterNone.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginStructuredDataDarwinLog/Makefile b/external/apache2/llvm/lib/liblldbPluginStructuredDataDarwinLog/Makefile
new file mode 100644
index 000000000000..265962b7dc04
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginStructuredDataDarwinLog/Makefile
@@ -0,0 +1,26 @@
+#	$NetBSD$
+
+LIB=	lldbPluginStructuredDataDarwinLog
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/StructuredData/DarwinLog
+
+SRCS+= \
+	StructuredDataDarwinLog.cpp
+
+LLDB_TABLEGEN_SRC= \
+	StructuredDataDarwinLogProperties.td
+LLDB_TABLEGEN_OUTPUT= \
+	StructuredDataDarwinLogProperties.inc|-gen-lldb-property-defs \
+	StructuredDataDarwinLogPropertiesEnum.inc|-gen-lldb-property-enum-defs
+LLDB_TABLEGEN_INCLUDES= \
+	-I${LLDB_SRCDIR}/source/Plugins/StructuredData/DarwinLog
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginSymbolFileBreakpad/Makefile b/external/apache2/llvm/lib/liblldbPluginSymbolFileBreakpad/Makefile
new file mode 100644
index 000000000000..2ee4e879deed
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginSymbolFileBreakpad/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginSymbolFileBreakpad
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/SymbolFile/Breakpad
+
+SRCS+= \
+	SymbolFileBreakpad.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginSymbolFileDWARF/Makefile b/external/apache2/llvm/lib/liblldbPluginSymbolFileDWARF/Makefile
new file mode 100644
index 000000000000..5d590be83810
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginSymbolFileDWARF/Makefile
@@ -0,0 +1,59 @@
+#	$NetBSD$
+
+LIB=	lldbPluginSymbolFileDWARF
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/SymbolFile/DWARF
+
+SRCS+= \
+	AppleDWARFIndex.cpp \
+	DebugNamesDWARFIndex.cpp \
+	DIERef.cpp \
+	DWARFAbbreviationDeclaration.cpp \
+	DWARFASTParserClang.cpp \
+	DWARFAttribute.cpp \
+	DWARFBaseDIE.cpp \
+	DWARFCompileUnit.cpp \
+	DWARFContext.cpp \
+	DWARFDataExtractor.cpp \
+	DWARFDebugAbbrev.cpp \
+	DWARFDebugAranges.cpp \
+	DWARFDebugArangeSet.cpp \
+	DWARFDebugInfo.cpp \
+	DWARFDebugInfoEntry.cpp \
+	DWARFDebugMacro.cpp \
+	DWARFDebugRanges.cpp \
+	DWARFDeclContext.cpp \
+	DWARFDefines.cpp \
+	DWARFDIE.cpp \
+	DWARFFormValue.cpp \
+	DWARFIndex.cpp \
+	DWARFTypeUnit.cpp \
+	DWARFUnit.cpp \
+	HashedNameToDIE.cpp \
+	LogChannelDWARF.cpp \
+	ManualDWARFIndex.cpp \
+	NameToDIE.cpp \
+	SymbolFileDWARF.cpp \
+	SymbolFileDWARFDwo.cpp \
+	SymbolFileDWARFDwoDwp.cpp \
+	SymbolFileDWARFDwp.cpp \
+	SymbolFileDWARFDebugMap.cpp \
+	UniqueDWARFASTType.cpp
+
+LLDB_TABLEGEN_SRC= \
+	SymbolFileDWARFProperties.td
+LLDB_TABLEGEN_OUTPUT= \
+	SymbolFileDWARFProperties.inc|-gen-lldb-property-defs \
+	SymbolFileDWARFPropertiesEnum.inc|-gen-lldb-property-enum-defs
+LLDB_TABLEGEN_INCLUDES= \
+	-I${LLDB_SRCDIR}/source/Plugins/SymbolFile/DWARF
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginSymbolFileNativePDB/Makefile b/external/apache2/llvm/lib/liblldbPluginSymbolFileNativePDB/Makefile
new file mode 100644
index 000000000000..955b598c30b1
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginSymbolFileNativePDB/Makefile
@@ -0,0 +1,25 @@
+#	$NetBSD$
+
+LIB=	lldbPluginSymbolFileNativePDB
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/SymbolFile/NativePDB
+
+SRCS+= \
+	CodeViewRegisterMapping.cpp \
+	CompileUnitIndex.cpp \
+	DWARFLocationExpression.cpp \
+	PdbAstBuilder.cpp \
+	PdbFPOProgramToDWARFExpression.cpp \
+	PdbIndex.cpp \
+	PdbSymUid.cpp \
+	PdbUtil.cpp \
+	SymbolFileNativePDB.cpp \
+	UdtRecordCompleter.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginSymbolFilePDB/Makefile b/external/apache2/llvm/lib/liblldbPluginSymbolFilePDB/Makefile
new file mode 100644
index 000000000000..580ec0666eba
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginSymbolFilePDB/Makefile
@@ -0,0 +1,18 @@
+#	$NetBSD$
+
+LIB=	lldbPluginSymbolFilePDB
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/SymbolFile/PDB
+
+SRCS+= \
+	PDBASTParser.cpp \
+	PDBLocationToDWARFExpression.cpp \
+	SymbolFilePDB.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginSymbolFileSymtab/Makefile b/external/apache2/llvm/lib/liblldbPluginSymbolFileSymtab/Makefile
new file mode 100644
index 000000000000..e62be65d62af
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginSymbolFileSymtab/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginSymbolFileSymtab
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/SymbolFile/Symtab
+
+SRCS+= \
+	SymbolFileSymtab.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginSymbolVendorELF/Makefile b/external/apache2/llvm/lib/liblldbPluginSymbolVendorELF/Makefile
new file mode 100644
index 000000000000..3f06911daf5b
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginSymbolVendorELF/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginSymbolVendorELF
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/SymbolVendor/ELF
+
+SRCS+= \
+	SymbolVendorELF.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginSymbolVendorMacOSX/Makefile b/external/apache2/llvm/lib/liblldbPluginSymbolVendorMacOSX/Makefile
new file mode 100644
index 000000000000..14ab091b1e07
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginSymbolVendorMacOSX/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginSymbolVendorMacOSX
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/SymbolVendor/MacOSX
+
+SRCS+= \
+	SymbolVendorMacOSX.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginSystemRuntimeMacOSX/Makefile b/external/apache2/llvm/lib/liblldbPluginSystemRuntimeMacOSX/Makefile
new file mode 100644
index 000000000000..53d423e61723
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginSystemRuntimeMacOSX/Makefile
@@ -0,0 +1,20 @@
+#	$NetBSD$
+
+LIB=	lldbPluginSystemRuntimeMacOSX
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/SystemRuntime/MacOSX
+
+SRCS+= \
+	AppleGetItemInfoHandler.cpp \
+	AppleGetPendingItemsHandler.cpp \
+	AppleGetQueuesHandler.cpp \
+	AppleGetThreadItemInfoHandler.cpp \
+	SystemRuntimeMacOSX.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginUnwindAssemblyInstEmulation/Makefile b/external/apache2/llvm/lib/liblldbPluginUnwindAssemblyInstEmulation/Makefile
new file mode 100644
index 000000000000..f0b331f3ab93
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginUnwindAssemblyInstEmulation/Makefile
@@ -0,0 +1,16 @@
+#	$NetBSD$
+
+LIB=	lldbPluginUnwindAssemblyInstEmulation
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/UnwindAssembly/InstEmulation
+
+SRCS+= \
+	UnwindAssemblyInstEmulation.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbPluginUnwindAssemblyX86/Makefile b/external/apache2/llvm/lib/liblldbPluginUnwindAssemblyX86/Makefile
new file mode 100644
index 000000000000..7b101289558e
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbPluginUnwindAssemblyX86/Makefile
@@ -0,0 +1,17 @@
+#	$NetBSD$
+
+LIB=	lldbPluginUnwindAssemblyX86
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Plugins/UnwindAssembly/x86
+
+SRCS+= \
+	UnwindAssembly-x86.cpp \
+	x86AssemblyInspectionEngine.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbSymbol/Makefile b/external/apache2/llvm/lib/liblldbSymbol/Makefile
new file mode 100644
index 000000000000..44edbac11a27
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbSymbol/Makefile
@@ -0,0 +1,53 @@
+#	$NetBSD$
+
+LIB=	lldbSymbol
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Symbol
+
+SRCS+= \
+	ArmUnwindInfo.cpp \
+	Block.cpp \
+	ClangASTContext.cpp \
+	ClangASTImporter.cpp \
+	ClangExternalASTSourceCallbacks.cpp \
+	ClangExternalASTSourceCommon.cpp \
+	ClangUtil.cpp \
+	CompactUnwindInfo.cpp \
+	CompileUnit.cpp \
+	CompilerDecl.cpp \
+	CompilerDeclContext.cpp \
+	CompilerType.cpp \
+	CxxModuleHandler.cpp \
+	DWARFCallFrameInfo.cpp \
+	DebugMacros.cpp \
+	Declaration.cpp \
+	DeclVendor.cpp \
+	FuncUnwinders.cpp \
+	Function.cpp \
+	LineEntry.cpp \
+	LineTable.cpp \
+	LocateSymbolFile.cpp \
+	ObjectFile.cpp \
+	PostfixExpression.cpp \
+	Symbol.cpp \
+	SymbolContext.cpp \
+	SymbolFile.cpp \
+	SymbolVendor.cpp \
+	Symtab.cpp \
+	Type.cpp \
+	TypeList.cpp \
+	TypeMap.cpp \
+	TypeSystem.cpp \
+	UnwindPlan.cpp \
+	UnwindTable.cpp \
+	Variable.cpp \
+	VariableList.cpp \
+	${PLATFORM_SOURCES}
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbTarget/Makefile b/external/apache2/llvm/lib/liblldbTarget/Makefile
new file mode 100644
index 000000000000..7dd8eddc42fa
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbTarget/Makefile
@@ -0,0 +1,82 @@
+#	$NetBSD$
+
+LIB=	lldbTarget
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Target
+
+SRCS+= \
+	ABI.cpp \
+	ExecutionContext.cpp \
+	JITLoader.cpp \
+	JITLoaderList.cpp \
+	InstrumentationRuntime.cpp \
+	InstrumentationRuntimeStopInfo.cpp \
+	Language.cpp \
+	LanguageRuntime.cpp \
+	Memory.cpp \
+	MemoryHistory.cpp \
+	MemoryRegionInfo.cpp \
+	ModuleCache.cpp \
+	OperatingSystem.cpp \
+	PathMappingList.cpp \
+	Platform.cpp \
+	Process.cpp \
+	Queue.cpp \
+	QueueItem.cpp \
+	QueueList.cpp \
+	RegisterContext.cpp \
+	RegisterNumber.cpp \
+	RemoteAwarePlatform.cpp \
+	SectionLoadHistory.cpp \
+	SectionLoadList.cpp \
+	StackFrame.cpp \
+	StackFrameList.cpp \
+	StackFrameRecognizer.cpp \
+	StackID.cpp \
+	StopInfo.cpp \
+	StructuredDataPlugin.cpp \
+	SystemRuntime.cpp \
+	Target.cpp \
+	TargetList.cpp \
+	Thread.cpp \
+	ThreadCollection.cpp \
+	ThreadList.cpp \
+	ThreadPlan.cpp \
+	ThreadPlanBase.cpp \
+	ThreadPlanCallFunction.cpp \
+	ThreadPlanCallFunctionUsingABI.cpp \
+	ThreadPlanCallOnFunctionExit.cpp \
+	ThreadPlanCallUserExpression.cpp \
+	ThreadPlanPython.cpp \
+	ThreadPlanRunToAddress.cpp \
+	ThreadPlanShouldStopHere.cpp \
+	ThreadPlanStepInRange.cpp \
+	ThreadPlanStepInstruction.cpp \
+	ThreadPlanStepOut.cpp \
+	ThreadPlanStepOverBreakpoint.cpp \
+	ThreadPlanStepOverRange.cpp \
+	ThreadPlanStepRange.cpp \
+	ThreadPlanStepThrough.cpp \
+	ThreadPlanStepUntil.cpp \
+	ThreadPlanTracer.cpp \
+	ThreadSpec.cpp \
+	UnixSignals.cpp \
+	UnwindAssembly.cpp
+
+LLDB_TABLEGEN_SRC= \
+	TargetProperties.td
+LLDB_TABLEGEN_OUTPUT= \
+	TargetProperties.inc|-gen-lldb-property-defs \
+	TargetPropertiesEnum.inc|-gen-lldb-property-enum-defs
+LLDB_TABLEGEN_INCLUDES= \
+	-I${LLDB_SRCDIR}/source/Target
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/lib/liblldbUtility/Makefile b/external/apache2/llvm/lib/liblldbUtility/Makefile
new file mode 100644
index 000000000000..9a9476af6e81
--- /dev/null
+++ b/external/apache2/llvm/lib/liblldbUtility/Makefile
@@ -0,0 +1,62 @@
+#	$NetBSD$
+
+LIB=	lldbUtility
+
+.include <bsd.init.mk>
+
+.PATH: ${LLDB_SRCDIR}/source/Utility
+
+SRCS+= \
+	ArchSpec.cpp \
+	Args.cpp \
+	Baton.cpp \
+	Broadcaster.cpp \
+	CompletionRequest.cpp \
+	Connection.cpp \
+	ConstString.cpp \
+	DataBufferHeap.cpp \
+	DataBufferLLVM.cpp \
+	DataEncoder.cpp \
+	DataExtractor.cpp \
+	Environment.cpp \
+	Event.cpp \
+	FileSpec.cpp \
+	GDBRemote.cpp \
+	IOObject.cpp \
+	LLDBAssert.cpp \
+	Listener.cpp \
+	Log.cpp \
+	Logging.cpp \
+	NameMatches.cpp \
+	ProcessInfo.cpp \
+	RegisterValue.cpp \
+	RegularExpression.cpp \
+	Reproducer.cpp \
+	ReproducerInstrumentation.cpp \
+	Scalar.cpp \
+	SelectHelper.cpp \
+	SharingPtr.cpp \
+	State.cpp \
+	Status.cpp \
+	Stream.cpp \
+	StreamCallback.cpp \
+	StreamString.cpp \
+	StringExtractor.cpp \
+	StringExtractorGDBRemote.cpp \
+	StringLexer.cpp \
+	StringList.cpp \
+	StructuredData.cpp \
+	TildeExpressionResolver.cpp \
+	Timer.cpp \
+	UUID.cpp \
+	UriParser.cpp \
+	UserID.cpp \
+	UserIDResolver.cpp \
+	VASprintf.cpp \
+	VMRange.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
diff --git a/external/apache2/llvm/link.mk b/external/apache2/llvm/link.mk
index 85b9ed771117..a0e002e53d29 100644
--- a/external/apache2/llvm/link.mk
+++ b/external/apache2/llvm/link.mk
@@ -10,6 +10,12 @@ LIB_BASE=	${NETBSDSRCDIR}/tools/llvm-lib
 LIB_BASE=	${LLVM_TOPLEVEL}/lib
 .endif
 
+.for l in ${LLDB_LIBS}
+LLDB_OBJDIR.${l}!=	cd ${LIB_BASE}/lib${l} && ${PRINTOBJDIR}
+LDADD+=	-L${LLDB_OBJDIR.${l}} -l${l}
+DPADD+=	${LLDB_OBJDIR.${l}}/lib${l}.a
+.endfor
+
 .for l in ${CLANG_LIBS}
 CLANG_OBJDIR.${l}!=	cd ${LIB_BASE}/lib${l} && ${PRINTOBJDIR}
 LDADD+=	-L${CLANG_OBJDIR.${l}} -l${l}
diff --git a/external/apache2/llvm/tablegen.mk b/external/apache2/llvm/tablegen.mk
index 775b2c1f946e..3d68b0401122 100644
--- a/external/apache2/llvm/tablegen.mk
+++ b/external/apache2/llvm/tablegen.mk
@@ -30,3 +30,18 @@ CLEANFILES+=	${f:C,\|.*$,,} ${f:C,\|.*$,,:C,$,.d,}
 .sinclude "${f:C,\|.*$,,:C,$,.d,}"
 .endfor
 .endfor
+
+.for t in ${LLDB_TABLEGEN_SRC}
+.for f in ${LLDB_TABLEGEN_OUTPUT} ${LLDB_TABLEGEN_OUTPUT.${t}}
+${f:C,\|.*$,,}: ${t} ${TOOL_LLDB_TBLGEN}
+	[ -z "${f:C,\|.*$,,}" ] || mkdir -p ${f:C,\|.*$,,:H}
+	${TOOL_LLDB_TBLGEN} -I${LLVM_SRCDIR}/include \
+	    ${LLDB_TABLEGEN_INCLUDES} ${LLDB_TABLEGEN_INCLUDES.${t}} \
+	    ${f:C,^.*\|,,:C,\^, ,} \
+	    ${.ALLSRC:M*/${t}} -d ${.TARGET}.d -o ${.TARGET}
+DPSRCS+=	${f:C,\|.*$,,}
+CLEANFILES+=	${f:C,\|.*$,,} ${f:C,\|.*$,,:C,$,.d,}
+
+.sinclude "${f:C,\|.*$,,:C,$,.d,}"
+.endfor
+.endfor
diff --git a/share/mk/bsd.README b/share/mk/bsd.README
index eb72aa61c608..7c029bb53f7c 100644
--- a/share/mk/bsd.README
+++ b/share/mk/bsd.README
@@ -327,6 +327,9 @@ MKLINKLIB	If "no", act as "MKLINT=no MKPICINSTALL=no MKPROFILE=no".
 MKLINT		If "no", don't build or install the lint libraries.
 		Default: yes
 
+MKLLDB		If "yes", build and install LLDB as host tool.
+		Default: no
+
 MKLLVM		If "yes", build and install clang as host tool and target
 		compiler.  Use as system compiler is enabled with HAVE_LLVM
 		(see below for details).
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index 13bac7704965..90726623ddd4 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -418,6 +418,7 @@ TOOL_INDXBIB=		${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
 TOOL_INSTALLBOOT=	${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
 TOOL_INSTALL_INFO=	${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
 TOOL_JOIN=		${TOOLDIR}/bin/${_TOOL_PREFIX}join
+TOOL_LLDB_TBLGEN=	${TOOLDIR}/bin/${_TOOL_PREFIX}lldb-tblgen
 TOOL_LLVM_TBLGEN=	${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen
 TOOL_M4=		${TOOLDIR}/bin/${_TOOL_PREFIX}m4
 TOOL_MACPPCFIXCOFF=	${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
diff --git a/tools/Makefile b/tools/Makefile
index 641690ea603f..031cb13a3052 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -133,6 +133,10 @@ SUBDIR+= \
 SUBDIR+= \
 	llvm-clang-tblgen
 .endif
+.if ${MKLLVM} != "no" && ${MKLLDB} != "no"
+SUBDIR+= \
+	llvm-lldb-tblgen
+.endif
 .if ${MKLLVM} != "no" && !defined(EXTERNAL_TOOLCHAIN)
 SUBDIR+= \
 	.WAIT llvm-include .WAIT \
diff --git a/tools/llvm-lldb-tblgen/Makefile b/tools/llvm-lldb-tblgen/Makefile
new file mode 100644
index 000000000000..36f5fd504158
--- /dev/null
+++ b/tools/llvm-lldb-tblgen/Makefile
@@ -0,0 +1,7 @@
+#	$NetBSD$
+
+HOSTPROGNAME=	${_TOOL_PREFIX}lldb-tblgen
+HOSTPROG_CXX=	${_TOOL_PREFIX}lldb-tblgen
+HOST_SRCDIR=	external/apache2/llvm/bin/lldb-tblgen
+
+.include "${.CURDIR}/../Makefile.host"
-- 
2.26.0



Home | Main Index | Thread Index | Old Index