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