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_CPUARCH:C/amd64/x86_64/} 12.endif 13CRTSRC= ${SRCTOP}/contrib/compiler-rt 14 15.PATH: ${CRTSRC}/lib 16 17CLANGDIR= /usr/lib/clang/6.0.0 18LIBDIR= ${CLANGDIR}/lib/freebsd 19 20NO_PIC= 21MK_PROFILE= no 22 23WARNS?= 0 24 25SSP_CFLAGS= 26CFLAGS+= -DNDEBUG 27CFLAGS+= -DHAVE_RPC_XDR_H=0 28CFLAGS+= -DHAVE_TIRPC_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 && ${COMPILER_VERSION} >= 30700 36CFLAGS+= -fno-sanitize=safe-stack 37.endif 38CFLAGS+= -fno-stack-protector 39CFLAGS+= -funwind-tables 40CXXFLAGS+= -fvisibility-inlines-hidden 41CXXFLAGS+= -fvisibility=hidden 42CFLAGS+= -I${CRTSRC}/lib 43CXXFLAGS+= -std=c++11 44