Index: lit/lit.cfg =================================================================== --- lit/lit.cfg +++ lit/lit.cfg @@ -78,6 +78,10 @@ config.cc += " -isysroot %s" % sdk_path config.cxx += " -isysroot %s" % sdk_path +if platform.system() in ['OpenBSD']: + config.cc += " -pthread" + config.cxx += " -pthread" + config.substitutions.append(('%cc', config.cc)) config.substitutions.append(('%cxx', config.cxx)) Index: packages/Python/lldbsuite/test/lldbtest.py =================================================================== --- packages/Python/lldbsuite/test/lldbtest.py +++ packages/Python/lldbsuite/test/lldbtest.py @@ -490,6 +490,8 @@ def builder_module(): if sys.platform.startswith("freebsd"): return __import__("builder_freebsd") + if sys.platform.startswith("openbsd"): + return __import__("builder_openbsd") if sys.platform.startswith("netbsd"): return __import__("builder_netbsd") if sys.platform.startswith("linux"): @@ -1395,7 +1397,7 @@ def getstdlibFlag(self): """ Returns the proper -stdlib flag, or empty if not required.""" - if self.platformIsDarwin() or self.getPlatform() == "freebsd": + if self.platformIsDarwin() or self.getPlatform() == "freebsd" or self.getPlatform() == "openbsd": stdlibflag = "-stdlib=libc++" else: # this includes NetBSD stdlibflag = "" @@ -1424,7 +1426,7 @@ 'FRAMEWORK_INCLUDES': "-F%s" % self.framework_dir, 'LD_EXTRAS': "%s -Wl,-rpath,%s" % (self.dsym, self.framework_dir), } - elif sys.platform.rstrip('0123456789') in ('freebsd', 'linux', 'netbsd', 'darwin') or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile': + elif sys.platform.rstrip('0123456789') in ('freebsd', 'linux', 'netbsd', 'openbsd', 'darwin') or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile': d = { 'CXX_SOURCES': sources, 'EXE': exe_name, @@ -1464,7 +1466,7 @@ 'FRAMEWORK_INCLUDES': "-F%s" % self.framework_dir, 'LD_EXTRAS': "%s -Wl,-rpath,%s -dynamiclib" % (self.dsym, self.framework_dir), } - elif sys.platform.rstrip('0123456789') in ('freebsd', 'linux', 'netbsd', 'darwin') or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile': + elif sys.platform.rstrip('0123456789') in ('freebsd', 'linux', 'netbsd', 'openbsd', 'darwin') or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile': d = { 'DYLIB_CXX_SOURCES': sources, 'DYLIB_NAME': lib_name, @@ -1672,6 +1674,8 @@ cflags += "c++11" if self.platformIsDarwin() or self.getPlatform() == "freebsd": cflags += " -stdlib=libc++" + elif self.getPlatform() == "openbsd": + cflags += " -stdlib=libc++" elif self.getPlatform() == "netbsd": cflags += " -stdlib=libstdc++" elif "clang" in self.getCompiler(): @@ -1706,7 +1710,7 @@ return lib_dir def getLibcPlusPlusLibs(self): - if self.getPlatform() in ('freebsd', 'linux', 'netbsd'): + if self.getPlatform() in ('freebsd', 'linux', 'netbsd', 'openbsd'): return ['libc++.so.1'] else: return ['libc++.1.dylib', 'libc++abi.dylib'] Index: packages/Python/lldbsuite/test/plugins/builder_openbsd.py =================================================================== --- /dev/null +++ packages/Python/lldbsuite/test/plugins/builder_openbsd.py @@ -0,0 +1,10 @@ +from builder_base import * + + +def buildDsym( + sender=None, + architecture=None, + compiler=None, + dictionary=None, + testdir=None): + return False