1# $FreeBSD$ 2 3.include <bsd.compiler.mk> 4 5# armv[67] is a bit special since we allow a soft-floating version via 6# CPUTYPE matching *soft*. This variant may not actually work though. 7.if ${MACHINE_ARCH:Marmv[67]*} != "" && \ 8 (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") 9CRTARCH?= armhf 10.else 11CRTARCH?= ${MACHINE_ARCH:C/amd64/x86_64/} 12.endif 13CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt 14 15.PATH: ${CRTSRC}/lib 16 17CLANGDIR= /usr/lib/clang/11.0.0 18LIBDIR= ${CLANGDIR}/lib/freebsd 19SHLIBDIR= ${LIBDIR} 20 21NO_PIC= 22MK_PROFILE= no 23 24WARNS?= 0 25 26SSP_CFLAGS= 27CFLAGS+= -DNDEBUG 28CFLAGS+= -DHAVE_RPC_XDR_H=0 29CFLAGS+= -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 30CFLAGS+= -DUBSAN_CAN_USE_CXXABI 31CFLAGS+= ${PICFLAG} 32CFLAGS+= -fno-builtin 33CFLAGS+= -fno-exceptions 34CXXFLAGS+= -fno-rtti 35.if ${COMPILER_TYPE} == clang 36CFLAGS+= -fno-sanitize=safe-stack 37.endif 38CFLAGS+= -fno-stack-protector 39CFLAGS+= -funwind-tables 40CXXFLAGS+= -fvisibility-inlines-hidden 41CXXFLAGS+= -fvisibility=hidden 42CFLAGS+= -I${CRTSRC}/include 43CFLAGS+= -I${CRTSRC}/lib 44CXXSTD= c++14 45