Home | History | Annotate | Line # | Download | only in libubsan
Makefile revision 1.6
      1 #	$NetBSD: Makefile,v 1.6 2023/02/20 02:12:28 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+= m ${NETBSDSRCDIR}/lib/libm
     36 LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
     37 LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
     38 CPPFLAGS+=-DCAN_SANITIZE_UB=1
     39 
     40 # XXX
     41 COPTS.ubsan_handlers.cc+=-Wno-error=maybe-uninitialized
     42 
     43 .include <bsd.lib.mk>
     44