Home | History | Annotate | Line # | Download | only in misc
Makefile revision 1.2
      1 # $NetBSD: Makefile,v 1.2 2018/08/09 12:45:15 christos Exp $
      2 
      3 .include <bsd.own.mk>
      4 
      5 TESTSDIR=	${TESTSBASE}/lib/libc/misc
      6 
      7 TESTS_C+=	t_ubsan
      8 TESTS_CXX+=	t_ubsanxx
      9 
     10 .PATH:		${NETBSDSRCDIR}/common/lib/libc/misc
     11 SRCS.t_ubsan=	t_ubsan.c ubsan.c
     12 SRCS.t_ubsanxx=	t_ubsanxx.cpp ubsan.c
     13 
     14 .if ${MKSANITIZER:Uno} != "yes" && ${MKLIBCSANITIZER:Uno} != "yes"
     15 # These tests are designed to be used against micro-UBSan only.
     16 # micro-UBSan is used in these tests as a standalone libary only.
     17 CPPFLAGS+=		-DENABLE_TESTS
     18 UBSAN_FLAGS=		-fsanitize=undefined
     19 UBSAN_FLAGS+=		${${ACTIVE_CC} == "clang" :? -fsanitize=integer :}
     20 UBSAN_FLAGS+=		${${ACTIVE_CC} == "clang" :? -fsanitize=nullability :}
     21 CFLAGS+=		${UBSAN_FLAGS}
     22 CXXFLAGS+=		${UBSAN_FLAGS}
     23 CWARNFLAGS+=		-Wno-return-type -Wno-strict-aliasing
     24 CWARNFLAGS.clang+=	-Wno-incompatible-pointer-types-discards-qualifiers
     25 CWARNFLAGS.clang+=	-Wno-nullability-completeness 
     26 .endif
     27 COPTS.t_ubsan.c += -Wno-stack-protector
     28 COPTS.t_ubsanxx.cpp += -Wno-stack-protector
     29 
     30 .include <bsd.test.mk>
     31