3 .include <bsd.compiler.mk>
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*} == "")
11 CRTARCH?= ${MACHINE_CPUARCH:C/amd64/x86_64/}
13 CRTSRC= ${SRCTOP}/contrib/compiler-rt
17 CLANGDIR= /usr/lib/clang/6.0.0
18 LIBDIR= ${CLANGDIR}/lib/freebsd
27 CFLAGS+= -DHAVE_RPC_XDR_H=0
28 CFLAGS+= -DHAVE_TIRPC_RPC_XDR_H=0
29 CFLAGS+= -DSANITIZER_SUPPORTS_WEAK_HOOKS=0
30 CFLAGS+= -DUBSAN_CAN_USE_CXXABI
33 CFLAGS+= -fno-exceptions
35 .if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700
36 CFLAGS+= -fno-sanitize=safe-stack
38 CFLAGS+= -fno-stack-protector
39 CFLAGS+= -funwind-tables
40 CXXFLAGS+= -fvisibility-inlines-hidden
41 CXXFLAGS+= -fvisibility=hidden
42 CFLAGS+= -I${CRTSRC}/lib