1 1.33 kamil # $NetBSD: Makefile,v 1.33 2020/09/14 15:01:57 kamil Exp $ 2 1.18 joerg 3 1.18 joerg UNSUPPORTED_COMPILER.clang= # defined 4 1.24 christos NOSANITIZER= # defined 5 1.1 christos 6 1.1 christos .include <bsd.own.mk> 7 1.1 christos 8 1.1 christos .include "../Makefile.inc" 9 1.16 christos .include "../Makefile.sanitizer" 10 1.1 christos 11 1.25 christos .PATH: ${SANITIZER}/asan ${SANITIZER}/lsan 12 1.1 christos 13 1.29 mrg # XXXmknative 14 1.1 christos ASAN_SRCS= \ 15 1.27 mrg asan_activation.cc \ 16 1.27 mrg asan_allocator.cc \ 17 1.27 mrg asan_debugging.cc \ 18 1.27 mrg asan_descriptions.cc \ 19 1.27 mrg asan_errors.cc \ 20 1.27 mrg asan_fake_stack.cc \ 21 1.27 mrg asan_flags.cc \ 22 1.27 mrg asan_globals.cc \ 23 1.27 mrg asan_interceptors.cc \ 24 1.29 mrg asan_interceptors_memintrinsics.cc \ 25 1.27 mrg asan_linux.cc \ 26 1.27 mrg asan_mac.cc \ 27 1.27 mrg asan_malloc_linux.cc \ 28 1.27 mrg asan_malloc_mac.cc \ 29 1.27 mrg asan_malloc_win.cc \ 30 1.27 mrg asan_memory_profile.cc \ 31 1.27 mrg asan_new_delete.cc \ 32 1.27 mrg asan_poisoning.cc \ 33 1.27 mrg asan_posix.cc \ 34 1.27 mrg asan_report.cc \ 35 1.27 mrg asan_rtl.cc \ 36 1.29 mrg asan_shadow_setup.cc \ 37 1.27 mrg asan_stack.cc \ 38 1.27 mrg asan_stats.cc \ 39 1.27 mrg asan_suppressions.cc \ 40 1.27 mrg asan_thread.cc \ 41 1.27 mrg asan_win.cc \ 42 1.27 mrg asan_win_dll_thunk.cc \ 43 1.27 mrg asan_win_dynamic_runtime_thunk.cc 44 1.1 christos 45 1.1 christos LIB= asan 46 1.25 christos SRCS+= ${ASAN_SRCS} lsan_common.cc lsan_common_linux.cc 47 1.21 christos LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt 48 1.30 mrg LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm 49 1.33 kamil LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread 50 1.28 mrg CPPFLAGS+=-DCAN_SANITIZE_UB=0 51 1.3 christos 52 1.10 martin .if ${MACHINE_ARCH} == "vax" 53 1.20 mrg COPTS.asan_allocator.cc += -O1 54 1.17 mrg COPTS.asan_report.cc += -O1 55 1.31 christos COPTS.sanitizer_file.cc += -O1 56 1.22 mrg COPTS.ubsan_diag.cc += -O1 57 1.22 mrg COPTS.ubsan_init.cc += -O1 58 1.10 martin .endif 59 1.10 martin 60 1.32 mrg .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" 61 1.32 mrg COPTS.asan_interceptors.cc += -O1 62 1.32 mrg .endif 63 1.32 mrg 64 1.1 christos .include <bsd.lib.mk> 65