1 # $NetBSD: Makefile,v 1.17 2020/09/05 09:50:15 mrg Exp $ 2 3 UNSUPPORTED_COMPILER.clang= # defined 4 LIBISCXX = yes 5 6 .include <bsd.own.mk> 7 8 .include "../Makefile.inc" 9 .include "../Makefile.sanitizer" 10 11 .PATH: ${SANITIZER}/ubsan 12 13 # XXXmknative 14 UBSAN_SRCS= \ 15 ubsan_diag.cc \ 16 ubsan_flags.cc \ 17 ubsan_handlers.cc \ 18 ubsan_init.cc \ 19 ubsan_monitor.cc \ 20 ubsan_type_hash.cc \ 21 ubsan_type_hash_itanium.cc \ 22 ubsan_type_hash_win.cc \ 23 ubsan_value.cc 24 25 .for _s in ubsan_handlers_cxx ubsan_type_hash ubsan_type_hash_itanium 26 COPTS.${_s}.cc+=-frtti 27 .endfor 28 29 .if ${MACHINE_ARCH} == "vax" 30 COPTS.sanitizer_file.cc += -O1 31 .endif 32 33 LIB= ubsan 34 SRCS+= ${UBSAN_SRCS} 35 LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt 36 CPPFLAGS+=-DCAN_SANITIZE_UB=1 37 38 .include <bsd.lib.mk> 39