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