../../sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
../../sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cpp
"
+elif [ "`uname -a | grep OpenBSD`" != "" ]; then
+ # The resulting object still depends on libc.
+ # We removed this dependency for Go runtime for other OSes,
+ # and we should remove it for OpenBSD as well, but there is no pressing need.
+ DEPENDS_ON_LIBC=1
+ SUFFIX="openbsd_amd64"
+ OSCFLAGS="-fno-strict-aliasing -fPIC -Werror"
+ ARCHCFLAGS="-m64"
+ OSLDFLAGS="-pthread -fPIC -fpie"
+ SRCS="
+ $SRCS
+ ../rtl/tsan_platform_linux.cpp
+ ../../sanitizer_common/sanitizer_posix.cpp
+ ../../sanitizer_common/sanitizer_posix_libcdep.cpp
+ ../../sanitizer_common/sanitizer_procmaps_bsd.cpp
+ ../../sanitizer_common/sanitizer_procmaps_common.cpp
+ ../../sanitizer_common/sanitizer_linux.cpp
+ ../../sanitizer_common/sanitizer_linux_libcdep.cpp
+ ../../sanitizer_common/sanitizer_openbsd.cpp
+ ../../sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
+ "
elif [ "`uname -a | grep Darwin`" != "" ]; then
SUFFIX="darwin_amd64"
OSCFLAGS="-fPIC -Wno-unused-const-variable -Wno-unknown-warning-option -mmacosx-version-min=10.7"
//
// This file is a part of ThreadSanitizer (TSan), a race detector.
//
-// Linux- and FreeBSD-specific code.
+// Linux- and BSD-specific code.
//===----------------------------------------------------------------------===//
-
#include "sanitizer_common/sanitizer_platform.h"
-#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD || \
+ SANITIZER_OPENBSD
#include "sanitizer_common/sanitizer_common.h"
#include "sanitizer_common/sanitizer_libc.h"
#include "sanitizer_common/sanitizer_linux.h"
#include "sanitizer_common/sanitizer_platform_limits_netbsd.h"
+#include "sanitizer_common/sanitizer_platform_limits_openbsd.h"
#include "sanitizer_common/sanitizer_platform_limits_posix.h"
#include "sanitizer_common/sanitizer_posix.h"
#include "sanitizer_common/sanitizer_procmaps.h"
-#include "sanitizer_common/sanitizer_stoptheworld.h"
#include "sanitizer_common/sanitizer_stackdepot.h"
+#include "sanitizer_common/sanitizer_stoptheworld.h"
+#include "tsan_flags.h"
#include "tsan_platform.h"
#include "tsan_rtl.h"
-#include "tsan_flags.h"
#include <fcntl.h>
#include <pthread.h>
} // namespace __tsan
-#endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
+#endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD ||
+ // SANITIZER_OPENBSD