1a3cf0ef5SEd Schouten# $FreeBSD$ 2a3cf0ef5SEd Schouten 3c6063d0dSWarner Losh.include <src.opts.mk> 4a3cf0ef5SEd Schouten 5a70cba95SGlen BarberPACKAGE= lib${LIB} 6a3cf0ef5SEd SchoutenLIB= compiler_rt 7a723bb66SRyan LibbyMK_SSP= no 8a3cf0ef5SEd SchoutenNO_PIC= 9a3cf0ef5SEd SchoutenWARNS?= 2 10a3cf0ef5SEd Schouten 1153b715b5SDimitry AndricCFLAGS+= ${PICFLAG} 1253b715b5SDimitry AndricCFLAGS+= -fvisibility=hidden 1353b715b5SDimitry AndricCFLAGS+= -DVISIBILITY_HIDDEN 14*874e27b5SDimitry AndricCFLAGS+= -I${SRCTOP}/contrib/llvm-project/libunwind/include 15a3cf0ef5SEd Schouten 16d006dde2SDimitry Andric# gcc has incompatible internal declarations for __divtc3 and __multc3, but has 17d006dde2SDimitry Andric# no option to silence its warning, so make warnings non-fatal. 187fa2f2a6SAlex RichardsonMK_WERROR.gcc= no 19d006dde2SDimitry Andric 20040b3049SEd Maste.include "Makefile.inc" 2179ef2c64SAndrew Turner 22af732203SDimitry Andric# Out-of-line LSE atomics helpers for aarch64 23af732203SDimitry Andric.if ${MACHINE_CPUARCH} == "aarch64" 24af732203SDimitry Andric. for pat in cas swp ldadd ldclr ldeor ldset 25af732203SDimitry Andric. for size in 1 2 4 8 16 26af732203SDimitry Andric. for model in 1 2 3 4 27af732203SDimitry Andric. if ${pat} == "cas" || ${size} != "16" 28af732203SDimitry Andric# Use .for to define lse_name, to get a special loop-local variable 29af732203SDimitry Andric. for lse_name in outline_atomic_${pat}${size}_${model}.S 30af732203SDimitry AndricCLEANFILES+= ${lse_name} 31af732203SDimitry AndricSTATICOBJS+= ${lse_name:R}.o 32af732203SDimitry AndricACFLAGS.${lse_name}+= -DL_${pat} -DSIZE=${size} -DMODEL=${model} -I${CRTSRC} 33af732203SDimitry Andric${lse_name}: lse.S 34af732203SDimitry Andric ln -sf ${.ALLSRC} ${.TARGET} 35af732203SDimitry Andric. endfor # lse_name 36af732203SDimitry Andric. endif 37af732203SDimitry Andric. endfor # model 38af732203SDimitry Andric. endfor # size 39af732203SDimitry Andric. endfor # pat 40af732203SDimitry Andric.endif 41af732203SDimitry Andric 42a3cf0ef5SEd Schouten.if ${MK_INSTALLLIB} != "no" 43a3cf0ef5SEd SchoutenSYMLINKS+= libcompiler_rt.a ${LIBDIR}/libgcc.a 44a3cf0ef5SEd Schouten.endif 45a3cf0ef5SEd Schouten.if ${MK_PROFILE} != "no" 46a3cf0ef5SEd SchoutenSYMLINKS+= libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a 47a3cf0ef5SEd Schouten.endif 48a3cf0ef5SEd Schouten 49a3cf0ef5SEd Schouten.include <bsd.lib.mk> 50