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