xref: /freebsd/lib/libclang_rt/Makefile.inc (revision 507b79f99ea0df4509edf0e92c41091d8dcd6583)
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+=	${PICFLAG}
28CFLAGS+=	-fno-builtin
29CFLAGS+=	-fno-exceptions
30CXXFLAGS+=	-fno-rtti
31.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700
32CFLAGS+=	-fno-sanitize=safe-stack
33.endif
34CFLAGS+=	-fno-stack-protector
35CFLAGS+=	-funwind-tables
36CXXFLAGS+=	-fvisibility-inlines-hidden
37CXXFLAGS+=	-fvisibility=hidden
38CFLAGS+=	-I${CRTSRC}/lib
39CXXFLAGS+=	-std=c++11
40