Home | History | Annotate | Line # | Download | only in libasan
Makefile revision 1.35.2.1
      1  1.35.2.1  perseant # $NetBSD: Makefile,v 1.35.2.1 2025/08/02 05:25:55 perseant Exp $
      2      1.18     joerg 
      3      1.18     joerg UNSUPPORTED_COMPILER.clang=	# defined
      4      1.24  christos NOSANITIZER=	# defined
      5       1.1  christos 
      6       1.1  christos .include <bsd.own.mk>
      7       1.1  christos 
      8       1.1  christos .include "../Makefile.inc"
      9      1.16  christos .include "../Makefile.sanitizer"
     10       1.1  christos 
     11      1.25  christos .PATH: ${SANITIZER}/asan ${SANITIZER}/lsan
     12       1.1  christos 
     13      1.29       mrg # XXXmknative
     14       1.1  christos ASAN_SRCS= \
     15      1.34       mrg 	asan_activation.cpp \
     16      1.34       mrg 	asan_allocator.cpp \
     17      1.34       mrg 	asan_debugging.cpp \
     18      1.34       mrg 	asan_descriptions.cpp \
     19      1.34       mrg 	asan_errors.cpp \
     20      1.34       mrg 	asan_fake_stack.cpp \
     21      1.34       mrg 	asan_flags.cpp \
     22      1.34       mrg 	asan_globals.cpp \
     23      1.34       mrg 	asan_interceptors.cpp \
     24      1.34       mrg 	asan_interceptors_memintrinsics.cpp \
     25      1.34       mrg 	asan_linux.cpp \
     26      1.34       mrg 	asan_mac.cpp \
     27      1.34       mrg 	asan_malloc_linux.cpp \
     28      1.34       mrg 	asan_malloc_mac.cpp \
     29      1.34       mrg 	asan_malloc_win.cpp \
     30      1.34       mrg 	asan_memory_profile.cpp \
     31      1.34       mrg 	asan_new_delete.cpp \
     32      1.34       mrg 	asan_poisoning.cpp \
     33      1.34       mrg 	asan_posix.cpp \
     34      1.34       mrg 	asan_premap_shadow.cpp \
     35      1.34       mrg 	asan_report.cpp \
     36      1.34       mrg 	asan_rtl.cpp \
     37      1.34       mrg 	asan_shadow_setup.cpp \
     38      1.34       mrg 	asan_stack.cpp \
     39      1.34       mrg 	asan_stats.cpp \
     40      1.34       mrg 	asan_suppressions.cpp \
     41      1.34       mrg 	asan_thread.cpp \
     42      1.34       mrg 	asan_win.cpp \
     43      1.34       mrg 	asan_win_dll_thunk.cpp \
     44      1.34       mrg 	asan_win_dynamic_runtime_thunk.cpp \
     45      1.34       mrg 	asan_interceptors_vfork.S
     46       1.1  christos 
     47       1.1  christos LIB=	asan
     48      1.34       mrg SRCS+=	${ASAN_SRCS} lsan_common.cpp lsan_common_linux.cpp
     49      1.21  christos LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
     50      1.30       mrg LIBDPLIBS+= m  ${NETBSDSRCDIR}/lib/libm
     51      1.33     kamil LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
     52      1.28       mrg CPPFLAGS+=-DCAN_SANITIZE_UB=0
     53       1.3  christos 
     54      1.32       mrg .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
     55      1.34       mrg COPTS.asan_interceptors.cpp += -O1
     56      1.32       mrg .endif
     57      1.32       mrg 
     58      1.35       mrg # This helps, but isn't enough.
     59      1.35       mrg .if ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m68000"
     60      1.35       mrg COPTS.asan_interceptors.cpp += -fno-jump-tables -Os
     61      1.35       mrg COPTS.asan_interceptors.cpp += -mlong-jump-table-offsets -Os
     62      1.35       mrg .endif
     63      1.35       mrg 
     64  1.35.2.1  perseant .include "../preinit.mk"
     65  1.35.2.1  perseant 
     66       1.1  christos .include <bsd.lib.mk>
     67