1 1.19 mrg # $NetBSD: Makefile,v 1.19 2025/09/16 22:27:20 mrg Exp $ 2 1.12 kamil 3 1.12 kamil UNSUPPORTED_COMPILER.clang= # defined 4 1.12 kamil NOSANITIZER= # defined 5 1.13 kamil NOCOMPAT= # defined 6 1.1 christos 7 1.1 christos .include <bsd.own.mk> 8 1.1 christos 9 1.1 christos .include "../Makefile.inc" 10 1.4 christos .include "../Makefile.sanitizer" 11 1.1 christos 12 1.4 christos .PATH: ${SANITIZER}/tsan 13 1.1 christos 14 1.10 mrg # XXXmknative 15 1.1 christos TSAN_SRCS= \ 16 1.17 mrg tsan_debugging.cpp \ 17 1.17 mrg tsan_external.cpp \ 18 1.17 mrg tsan_fd.cpp \ 19 1.17 mrg tsan_flags.cpp \ 20 1.17 mrg tsan_ignoreset.cpp \ 21 1.17 mrg tsan_interceptors_posix.cpp \ 22 1.17 mrg tsan_interceptors_mac.cpp \ 23 1.19 mrg tsan_interceptors_memintrinsics.cpp \ 24 1.17 mrg tsan_interface_ann.cpp \ 25 1.17 mrg tsan_interface_atomic.cpp \ 26 1.17 mrg tsan_interface.cpp \ 27 1.17 mrg tsan_interface_java.cpp \ 28 1.17 mrg tsan_malloc_mac.cpp \ 29 1.17 mrg tsan_md5.cpp \ 30 1.17 mrg tsan_mman.cpp \ 31 1.17 mrg tsan_mutexset.cpp \ 32 1.17 mrg tsan_new_delete.cpp \ 33 1.17 mrg tsan_platform_linux.cpp \ 34 1.17 mrg tsan_platform_mac.cpp \ 35 1.17 mrg tsan_platform_posix.cpp \ 36 1.17 mrg tsan_platform_windows.cpp \ 37 1.17 mrg tsan_report.cpp \ 38 1.17 mrg tsan_rtl.cpp \ 39 1.17 mrg tsan_rtl_access.cpp \ 40 1.17 mrg tsan_rtl_mutex.cpp \ 41 1.17 mrg tsan_rtl_proc.cpp \ 42 1.17 mrg tsan_rtl_report.cpp \ 43 1.17 mrg tsan_rtl_thread.cpp \ 44 1.17 mrg tsan_stack_trace.cpp \ 45 1.17 mrg tsan_suppressions.cpp \ 46 1.17 mrg tsan_symbolize.cpp \ 47 1.17 mrg tsan_sync.cpp \ 48 1.17 mrg tsan_vector_clock.cpp 49 1.7 mrg 50 1.14 kamil .if ${MACHINE_ARCH} == "x86_64" 51 1.14 kamil TSAN_SRCS+= tsan_rtl_amd64.S 52 1.17 mrg .elif ${MACHINE_CPU} == "aarch64" 53 1.14 kamil TSAN_SRCS+= tsan_rtl_aarch64.S 54 1.16 christos .elif ${MACHINE_MIPS64} 55 1.14 kamil TSAN_SRCS+= tsan_rtl_mips64.S 56 1.14 kamil .elif ${MACHINE_ARCH} == "powerpc64" 57 1.14 kamil TSAN_SRCS+= tsan_rtl_ppc64.S 58 1.19 mrg .elif ${MACHINE_ARCH} == "riscv64" 59 1.19 mrg TSAN_SRCS+= tsan_rtl_riscv64.S 60 1.5 christos .else 61 1.14 kamil .error Unsupported 62 1.5 christos .endif 63 1.5 christos 64 1.2 christos LIB= tsan 65 1.4 christos SRCS+= ${TSAN_SRCS} 66 1.12 kamil LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt 67 1.12 kamil LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm 68 1.15 kamil LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread 69 1.9 mrg CPPFLAGS+=-DCAN_SANITIZE_UB=0 70 1.19 mrg 71 1.17 mrg COPTS.tsan_interceptors.cpp += -Wno-unused-function 72 1.19 mrg COPTS.tsan_sync.cpp += -Wno-error=parentheses 73 1.19 mrg COPTS.tsan_sync.cpp += -Wno-error=maybe-uninitialized 74 1.1 christos 75 1.18 christos .include "../preinit.mk" 76 1.18 christos 77 1.1 christos .include <bsd.lib.mk> 78