]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libcompiler_rt/Makefile
libarchive: import changes from upstream
[FreeBSD/FreeBSD.git] / lib / libcompiler_rt / Makefile
1 # $FreeBSD$
2
3 .include <src.opts.mk>
4
5 PACKAGE=        lib${LIB}
6 LIB=            compiler_rt
7 MK_SSP=         no
8 NO_PIC=
9 WARNS?=         2
10
11 CFLAGS+=        ${PICFLAG}
12 CFLAGS+=        -fvisibility=hidden
13 CFLAGS+=        -DVISIBILITY_HIDDEN
14 CFLAGS+=        -I${SRCTOP}/contrib/libcxxrt
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.
18 MK_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
30 CLEANFILES+=    ${lse_name}
31 STATICOBJS+=    ${lse_name:R}.o
32 ACFLAGS.${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"
43 SYMLINKS+=      libcompiler_rt.a ${LIBDIR}/libgcc.a
44 .endif
45 .if ${MK_PROFILE} != "no"
46 SYMLINKS+=      libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a
47 .endif
48
49 .include <bsd.lib.mk>