1.include <src.opts.mk> 2 3PACKAGE= lib${LIB} 4LIB= compiler_rt 5MK_SSP= no 6NO_PIC= 7WARNS?= 2 8 9CFLAGS+= ${PICFLAG} 10CFLAGS+= -fvisibility=hidden 11CFLAGS+= -DVISIBILITY_HIDDEN 12CFLAGS+= -I${SRCTOP}/contrib/llvm-project/libunwind/include 13 14# gcc has incompatible internal declarations for __divtc3 and __multc3, but has 15# no option to silence its warning, so make warnings non-fatal. 16MK_WERROR.gcc= no 17 18.include "Makefile.inc" 19 20# Out-of-line LSE atomics helpers for aarch64 21.if ${MACHINE_CPUARCH} == "aarch64" 22. for pat in cas swp ldadd ldclr ldeor ldset 23. for size in 1 2 4 8 16 24. for model in 1 2 3 4 5 25. if ${pat} == "cas" || ${size} != "16" 26# Use .for to define lse_name, to get a special loop-local variable 27. for lse_name in outline_atomic_${pat}${size}_${model}.S 28CLEANFILES+= ${lse_name} 29STATICOBJS+= ${lse_name:R}.o 30ACFLAGS.${lse_name}+= -DL_${pat} -DSIZE=${size} -DMODEL=${model} -I${CRTSRC} 31${lse_name}: lse.S 32 ln -sf ${.ALLSRC} ${.TARGET} 33. endfor # lse_name 34. endif 35. endfor # model 36. endfor # size 37. endfor # pat 38.endif 39 40.if ${MK_INSTALLLIB} != "no" 41SYMLINKS+= libcompiler_rt.a ${LIBDIR}/libgcc.a 42.endif 43.if ${MK_PROFILE} != "no" 44SYMLINKS+= libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a 45.endif 46 47.include <bsd.lib.mk> 48