xref: /freebsd/lib/libcompiler_rt/Makefile (revision d006dde2fdfdf317c2215d0317480f661886a2f9)
1a3cf0ef5SEd Schouten# $FreeBSD$
2a3cf0ef5SEd Schouten
3c6063d0dSWarner Losh.include <src.opts.mk>
4a3cf0ef5SEd Schouten
5a70cba95SGlen BarberPACKAGE=	lib${LIB}
6a3cf0ef5SEd SchoutenLIB=		compiler_rt
7a3cf0ef5SEd SchoutenNO_PIC=
8a3cf0ef5SEd SchoutenWARNS?=		2
9a3cf0ef5SEd Schouten
1053b715b5SDimitry AndricCFLAGS+=	${PICFLAG}
1153b715b5SDimitry AndricCFLAGS+=	-fvisibility=hidden
1253b715b5SDimitry AndricCFLAGS+=	-DVISIBILITY_HIDDEN
1353b715b5SDimitry AndricCFLAGS+=	-I${SRCTOP}/contrib/libcxxrt
14a3cf0ef5SEd Schouten
1529a85f30SDimitry Andric.if ${COMPILER_TYPE} == "clang"
1629a85f30SDimitry AndricCWARNFLAGS.gcc_personality_v0.c+= -Wno-typedef-redefinition
1729a85f30SDimitry Andric.endif
1829a85f30SDimitry Andric
19*d006dde2SDimitry Andric# gcc has incompatible internal declarations for __divtc3 and __multc3, but has
20*d006dde2SDimitry Andric# no option to silence its warning, so make warnings non-fatal.
21*d006dde2SDimitry AndricNO_WERROR.gcc=
22*d006dde2SDimitry Andric
23040b3049SEd Maste.include "Makefile.inc"
2479ef2c64SAndrew Turner
25a3cf0ef5SEd Schouten.if ${MK_INSTALLLIB} != "no"
26a3cf0ef5SEd SchoutenSYMLINKS+=	libcompiler_rt.a ${LIBDIR}/libgcc.a
27a3cf0ef5SEd Schouten.endif
28a3cf0ef5SEd Schouten.if ${MK_PROFILE} != "no"
29a3cf0ef5SEd SchoutenSYMLINKS+=	libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a
30a3cf0ef5SEd Schouten.endif
31a3cf0ef5SEd Schouten
32a3cf0ef5SEd Schouten.include <bsd.lib.mk>
33