summaryrefslogtreecommitdiff
path: root/external/gpl3/gcc/lib/libasan/Makefile
blob: 7276a8ecc436e0ec27e9b4236ca48126c131626e (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

.include <bsd.own.mk>

.include "../Makefile.inc"

ASAN=${GCCDIST}/libsanitizer
.PATH: ${ASAN}/asan ${ASAN}/interception ${ASAN}/sanitizer_common

ASAN_SRCS= \
	asan_allocator.cc \
	asan_allocator2.cc \
	asan_interceptors.cc \
	asan_posix.cc \
	asan_new_delete.cc \
	asan_rtl.cc \
	asan_stats.cc \
	asan_globals.cc \
	asan_thread_registry.cc \
	asan_fake_stack.cc \
	asan_linux.cc \
	asan_report.cc \
	asan_malloc_linux.cc \
	asan_poisoning.cc \
	asan_stack.cc \
	asan_thread.cc \
	asan_preinit.cc

INTERCEPTION_SRCS= \
	interception_linux.cc \
	interception_type_test.cc

SANITIZER_SRCS= \
	sanitizer_allocator.cc \
	sanitizer_common.cc \
	sanitizer_flags.cc \
	sanitizer_libc.cc \
	sanitizer_netbsd.cc \
	sanitizer_mac.cc \
	sanitizer_posix.cc \
	sanitizer_platform_limits_posix.cc \
	sanitizer_printf.cc \
	sanitizer_stackdepot.cc \
	sanitizer_stacktrace.cc \
	sanitizer_symbolizer.cc \
	sanitizer_symbolizer_linux.cc \
	sanitizer_win.cc

# The linux build does this to avoid preinit sections on shared libraries
CSHLIBFLAGS+= -DPIC

LIB=	asan
SRCS=	${ASAN_SRCS} ${INTERCEPTION_SRCS} ${SANITIZER_SRCS}
CPPFLAGS+=-I${ASAN}/include -I${ASAN}
CPPFLAGS.sanitizer_netbsd.cc+=-I${GCCDIST}/gcc/ginclude

LIBDPLIBS+=    stdc++ ${.CURDIR}/../libstdc++-v3
LIBDPLIBS+=    pthread ${.CURDIR}/../../../../../lib/libpthread

.if ${MACHINE_ARCH} == "vax"
COPTS.asan_allocator2.cc += -O1
COPTS.sanitizer_mac.cc += -O1
COPTS.sanitizer_netbsd.cc += -O1
COPTS.sanitizer_printf.cc += -O1
COPTS.sanitizer_stackdepot.cc += -O1
.endif

.include <bsd.lib.mk>