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