xref: /freebsd/lib/libcompiler_rt/Makefile (revision 29a85f30b7bd5041da4609e467bc3d61f37637bb)
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
15*29a85f30SDimitry Andric.if ${COMPILER_TYPE} == "clang"
16*29a85f30SDimitry AndricCWARNFLAGS.gcc_personality_v0.c+= -Wno-typedef-redefinition
17*29a85f30SDimitry Andric.endif
18*29a85f30SDimitry Andric
19040b3049SEd Maste.include "Makefile.inc"
2079ef2c64SAndrew Turner
21a3cf0ef5SEd Schouten.if ${MK_INSTALLLIB} != "no"
22a3cf0ef5SEd SchoutenSYMLINKS+=	libcompiler_rt.a ${LIBDIR}/libgcc.a
23a3cf0ef5SEd Schouten.endif
24a3cf0ef5SEd Schouten.if ${MK_PROFILE} != "no"
25a3cf0ef5SEd SchoutenSYMLINKS+=	libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a
26a3cf0ef5SEd Schouten.endif
27a3cf0ef5SEd Schouten
28c42c9d56SKonstantin Belousov.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \
2996cdb0abSKonstantin Belousov    ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH:Marmv6*}
30153344e7SKonstantin BelousovAFLAGS+=	--noexecstack
31127060d2SKonstantin BelousovACFLAGS+=	-Wa,--noexecstack
32153344e7SKonstantin Belousov.endif
33153344e7SKonstantin Belousov
34a3cf0ef5SEd Schouten.include <bsd.lib.mk>
35