Index: stand/Makefile.inc =================================================================== --- stand/Makefile.inc +++ stand/Makefile.inc @@ -1,8 +1,10 @@ # $FreeBSD$ -# Sanitizers won't work for stand +.if !defined(_USE_DEFAULT_USERSPACE_LIBS) +# Sanitizers won't work for stand (except for userboot/test). MK_ASAN:=no MK_UBSAN:=no +.endif SUBDIR_PARALLEL= yes Index: stand/userboot/test/Makefile =================================================================== --- stand/userboot/test/Makefile +++ stand/userboot/test/Makefile @@ -1,5 +1,10 @@ # $FreeBSD$ +# Unlike the other programs in stand this links the normal userspace libraries +# so we have to ensure MK_ASAN/MK_UBSAN matches the default to avoid linker +# errors (this assignment prevents stand/Makefile.inc from setting MK_ASAN=no). +_USE_DEFAULT_USERSPACE_LIBS=yes + .include PROG= test