define CAN_SANITIZE_UB properly: libasan and libtsan need to not

have it set, libubsan needs to have it set.

fixes almost all the new atf failures from GCC 7 switch.
This commit is contained in:
mrg 2019-02-08 22:06:12 +00:00
parent 9542a629ba
commit 928cce347f
3 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.27 2019/02/06 04:00:43 mrg Exp $
# $NetBSD: Makefile,v 1.28 2019/02/08 22:06:12 mrg Exp $
UNSUPPORTED_COMPILER.clang= # defined
NOSANITIZER= # defined
@ -42,6 +42,7 @@ ASAN_SRCS= \
LIB= asan
SRCS+= ${ASAN_SRCS} lsan_common.cc lsan_common_linux.cc
LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
CPPFLAGS+=-DCAN_SANITIZE_UB=0
.if ${MACHINE_ARCH} == "vax"
COPTS.asan_allocator.cc += -O1

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.8 2019/02/06 04:00:43 mrg Exp $
# $NetBSD: Makefile,v 1.9 2019/02/08 22:06:12 mrg Exp $
.include <bsd.own.mk>
@ -51,5 +51,6 @@ TSAN_SRCS+= tsan_rtl_unimpl.cc
LIB= tsan
SRCS+= ${TSAN_SRCS}
CPPFLAGS+=-DCAN_SANITIZE_UB=0
.include <bsd.lib.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.10 2019/02/06 04:00:43 mrg Exp $
# $NetBSD: Makefile,v 1.11 2019/02/08 22:06:12 mrg Exp $
UNSUPPORTED_COMPILER.clang= # defined
LIBISCXX = yes
@ -31,5 +31,6 @@ COPTS.ubsan_handlers_cxx.cc+= -Wno-error=maybe-uninitialized
LIB= ubsan
SRCS+= ${UBSAN_SRCS}
LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
CPPFLAGS+=-DCAN_SANITIZE_UB=1
.include <bsd.lib.mk>