blob: b428fc42026e54708e457a5eac5369f24ad74471 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# $NetBSD: Makefile,v 1.20 2023/06/03 21:31:46 lukem Exp $
UNSUPPORTED_COMPILER.clang= # defined
LIBISCXX = yes
.include <bsd.own.mk>
.include "../Makefile.inc"
.include "../Makefile.sanitizer"
.PATH: ${SANITIZER}/ubsan
# XXXmknative
UBSAN_SRCS= \
ubsan_diag.cc \
ubsan_flags.cc \
ubsan_handlers.cc \
ubsan_init.cc \
ubsan_monitor.cc \
ubsan_type_hash.cc \
ubsan_type_hash_itanium.cc \
ubsan_type_hash_win.cc \
ubsan_value.cc
.for _s in ubsan_handlers_cxx ubsan_type_hash ubsan_type_hash_itanium
COPTS.${_s}.cc+=-frtti
.endfor
.if ${MACHINE_ARCH} == "vax"
COPTS.sanitizer_file.cc += -O1
.endif
LIB= ubsan
SRCS+= ${UBSAN_SRCS}
LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm
LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
CPPFLAGS+=-DCAN_SANITIZE_UB=1
# XXX
COPTS.ubsan_handlers.cc+=${CC_WNO_MAYBE_UNINITIALIZED}
.include <bsd.lib.mk>
|