xref: /minix/external/gpl3/gcc/lib/libasan/Makefile (revision 0a6a1f1d)
1
2.include <bsd.own.mk>
3
4.include "../Makefile.inc"
5
6ASAN=${GCCDIST}/libsanitizer
7.PATH: ${ASAN}/asan ${ASAN}/interception ${ASAN}/sanitizer_common
8
9ASAN_SRCS= \
10	asan_allocator.cc \
11	asan_allocator2.cc \
12	asan_interceptors.cc \
13	asan_posix.cc \
14	asan_new_delete.cc \
15	asan_rtl.cc \
16	asan_stats.cc \
17	asan_globals.cc \
18	asan_thread_registry.cc \
19	asan_fake_stack.cc \
20	asan_linux.cc \
21	asan_report.cc \
22	asan_malloc_linux.cc \
23	asan_poisoning.cc \
24	asan_stack.cc \
25	asan_thread.cc \
26	asan_preinit.cc
27
28INTERCEPTION_SRCS= \
29	interception_linux.cc \
30	interception_type_test.cc
31
32SANITIZER_SRCS= \
33	sanitizer_allocator.cc \
34	sanitizer_common.cc \
35	sanitizer_flags.cc \
36	sanitizer_libc.cc \
37	sanitizer_netbsd.cc \
38	sanitizer_mac.cc \
39	sanitizer_posix.cc \
40	sanitizer_platform_limits_posix.cc \
41	sanitizer_printf.cc \
42	sanitizer_stackdepot.cc \
43	sanitizer_stacktrace.cc \
44	sanitizer_symbolizer.cc \
45	sanitizer_symbolizer_linux.cc \
46	sanitizer_win.cc
47
48# The linux build does this to avoid preinit sections on shared libraries
49CSHLIBFLAGS+= -DPIC
50
51LIB=	asan
52SRCS=	${ASAN_SRCS} ${INTERCEPTION_SRCS} ${SANITIZER_SRCS}
53CPPFLAGS+=-I${ASAN}/include -I${ASAN}
54CPPFLAGS.sanitizer_netbsd.cc+=-I${GCCDIST}/gcc/ginclude
55
56LIBDPLIBS+=    stdc++ ${.CURDIR}/../libstdc++-v3
57LIBDPLIBS+=    pthread ${.CURDIR}/../../../../../lib/libpthread
58
59.if ${MACHINE_ARCH} == "vax"
60COPTS.asan_allocator2.cc += -O1
61COPTS.sanitizer_mac.cc += -O1
62COPTS.sanitizer_netbsd.cc += -O1
63COPTS.sanitizer_printf.cc += -O1
64COPTS.sanitizer_stackdepot.cc += -O1
65.endif
66
67.include <bsd.lib.mk>
68