2010-11-11 15:13:11 +00:00
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2010-11-11 15:13:11 +00:00
|
|
|
|
2016-09-03 21:41:29 +00:00
|
|
|
PACKAGE= lib${LIB}
|
|
|
|
LIB= compiler_rt
|
2020-12-28 08:44:25 +00:00
|
|
|
MK_SSP= no
|
2010-11-11 15:13:11 +00:00
|
|
|
NO_PIC=
|
2016-09-03 21:41:29 +00:00
|
|
|
WARNS?= 2
|
|
|
|
|
|
|
|
CFLAGS+= ${PICFLAG}
|
|
|
|
CFLAGS+= -fvisibility=hidden
|
|
|
|
CFLAGS+= -DVISIBILITY_HIDDEN
|
2022-03-09 21:23:35 +00:00
|
|
|
CFLAGS+= -I${SRCTOP}/contrib/llvm-project/libunwind/include
|
2016-09-03 21:41:29 +00:00
|
|
|
|
2017-03-21 21:07:37 +00:00
|
|
|
# gcc has incompatible internal declarations for __divtc3 and __multc3, but has
|
|
|
|
# no option to silence its warning, so make warnings non-fatal.
|
2021-01-06 17:55:06 +00:00
|
|
|
MK_WERROR.gcc= no
|
2017-03-21 21:07:37 +00:00
|
|
|
|
2016-09-27 18:55:45 +00:00
|
|
|
.include "Makefile.inc"
|
2013-01-19 02:28:44 +00:00
|
|
|
|
2021-07-28 20:30:04 +00:00
|
|
|
# Out-of-line LSE atomics helpers for aarch64
|
|
|
|
.if ${MACHINE_CPUARCH} == "aarch64"
|
|
|
|
. for pat in cas swp ldadd ldclr ldeor ldset
|
|
|
|
. for size in 1 2 4 8 16
|
|
|
|
. for model in 1 2 3 4
|
|
|
|
. if ${pat} == "cas" || ${size} != "16"
|
|
|
|
# Use .for to define lse_name, to get a special loop-local variable
|
|
|
|
. for lse_name in outline_atomic_${pat}${size}_${model}.S
|
|
|
|
CLEANFILES+= ${lse_name}
|
|
|
|
STATICOBJS+= ${lse_name:R}.o
|
|
|
|
ACFLAGS.${lse_name}+= -DL_${pat} -DSIZE=${size} -DMODEL=${model} -I${CRTSRC}
|
|
|
|
${lse_name}: lse.S
|
|
|
|
ln -sf ${.ALLSRC} ${.TARGET}
|
|
|
|
. endfor # lse_name
|
|
|
|
. endif
|
|
|
|
. endfor # model
|
|
|
|
. endfor # size
|
|
|
|
. endfor # pat
|
|
|
|
.endif
|
|
|
|
|
2013-04-20 14:44:28 +00:00
|
|
|
.if ${MK_INSTALLLIB} != "no"
|
2016-09-03 21:41:29 +00:00
|
|
|
SYMLINKS+= libcompiler_rt.a ${LIBDIR}/libgcc.a
|
2013-04-20 14:44:28 +00:00
|
|
|
.endif
|
|
|
|
.if ${MK_PROFILE} != "no"
|
2016-09-03 21:41:29 +00:00
|
|
|
SYMLINKS+= libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a
|
2010-11-11 15:13:11 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|