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