1.include <bsd.compiler.mk> 2 3PACKAGE= clang 4CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt 5.include "compiler-rt-vars.mk" 6 7.PATH: ${CRTSRC}/lib 8 9LIBDIR= ${SANITIZER_LIBDIR} 10SHLIBDIR= ${LIBDIR} 11 12NO_PIC= 13MK_ASAN:= no 14MK_SSP= no 15MK_UBSAN:= no 16 17WARNS?= 0 18 19CFLAGS+= -DNDEBUG 20CFLAGS+= -DHAVE_RPC_XDR_H=0 21CFLAGS+= -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 22CFLAGS+= -DUBSAN_CAN_USE_CXXABI 23CFLAGS+= ${PICFLAG} 24CFLAGS+= -fno-builtin 25CFLAGS+= -fno-exceptions 26CXXFLAGS+= -fno-rtti 27.if ${COMPILER_TYPE} == clang 28CFLAGS+= -fno-sanitize=safe-stack 29.endif 30CFLAGS+= -fno-stack-protector 31CFLAGS+= -funwind-tables 32CXXFLAGS+= -fvisibility-inlines-hidden 33CXXFLAGS+= -fvisibility=hidden 34CFLAGS+= -I${CRTSRC}/include 35CFLAGS+= -I${CRTSRC}/lib 36CXXSTD= c++17 37