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/9.0.1 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+= -DHAVE_TIRPC_RPC_XDR_H=0 30CFLAGS+= -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 31CFLAGS+= -DUBSAN_CAN_USE_CXXABI 32CFLAGS+= ${PICFLAG} 33CFLAGS+= -fno-builtin 34CFLAGS+= -fno-exceptions 35CXXFLAGS+= -fno-rtti 36.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700 37CFLAGS+= -fno-sanitize=safe-stack 38.endif 39CFLAGS+= -fno-stack-protector 40CFLAGS+= -funwind-tables 41CXXFLAGS+= -fvisibility-inlines-hidden 42CXXFLAGS+= -fvisibility=hidden 43CFLAGS+= -I${CRTSRC}/include 44CFLAGS+= -I${CRTSRC}/lib 45CXXSTD= c++11 46