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