1 # $NetBSD: Makefile,v 1.16 2019/10/28 16:25:05 christos 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_type_hash.cc \ 20 ubsan_type_hash_itanium.cc \ 21 ubsan_type_hash_win.cc \ 22 ubsan_value.cc 23 24 .for _s in ubsan_handlers_cxx ubsan_type_hash ubsan_type_hash_itanium 25 COPTS.${_s}.cc+=-frtti 26 .endfor 27 28 .if ${MACHINE_ARCH} == "vax" 29 COPTS.sanitizer_file.cc += -O1 30 .endif 31 32 LIB= ubsan 33 SRCS+= ${UBSAN_SRCS} 34 LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt 35 CPPFLAGS+=-DCAN_SANITIZE_UB=1 36 37 .include <bsd.lib.mk> 38