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