]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - lib/libcompiler_rt/Makefile
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / lib / libcompiler_rt / Makefile
1 # $FreeBSD$
2
3 .include <bsd.own.mk>
4
5 LIB=    compiler_rt
6 NO_PIC=
7 WARNS?= 2
8
9 CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN
10
11 .if ${MACHINE_CPUARCH} == "amd64"
12 CRTARCH=x86_64
13 .else
14 CRTARCH=${MACHINE_CPUARCH}
15 .endif
16
17 CRTSRC=${.CURDIR}/../../contrib/compiler-rt/lib
18
19 .PATH: ${CRTSRC}/${CRTARCH} ${CRTSRC}
20
21 SRCF=   absvdi2 \
22         absvsi2 \
23         absvti2 \
24         addvdi3 \
25         addvsi3 \
26         addvti3 \
27         ashldi3 \
28         ashlti3 \
29         ashrdi3 \
30         ashrti3 \
31         clear_cache \
32         clzdi2 \
33         clzsi2 \
34         clzti2 \
35         cmpdi2 \
36         cmpti2 \
37         comparedf2 \
38         comparesf2 \
39         ctzdi2 \
40         ctzsi2 \
41         ctzti2 \
42         divdc3 \
43         divdi3 \
44         divmoddi4 \
45         divmodsi4 \
46         divsc3 \
47         divti3 \
48         divxc3 \
49         enable_execute_stack \
50         eprintf \
51         ffsdi2 \
52         ffsti2 \
53         fixdfdi \
54         fixdfti \
55         fixsfdi \
56         fixsfti \
57         fixunsdfdi \
58         fixunsdfsi \
59         fixunsdfti \
60         fixunssfdi \
61         fixunssfsi \
62         fixunssfti \
63         fixunsxfdi \
64         fixunsxfsi \
65         fixunsxfti \
66         fixxfdi \
67         fixxfti \
68         floatdidf \
69         floatdisf \
70         floatdixf \
71         floattidf \
72         floattisf \
73         floattixf \
74         floatundidf \
75         floatundisf \
76         floatundixf \
77         floatunsidf \
78         floatunsisf \
79         floatuntidf \
80         floatuntisf \
81         floatuntixf \
82         int_util \
83         lshrdi3 \
84         lshrti3 \
85         moddi3 \
86         modti3 \
87         muldc3 \
88         muldi3 \
89         mulodi4 \
90         mulosi4 \
91         muloti4 \
92         mulsc3 \
93         multi3 \
94         mulvdi3 \
95         mulvsi3 \
96         mulvti3 \
97         mulxc3 \
98         negdf2 \
99         negdi2 \
100         negsf2 \
101         negti2 \
102         negvdi2 \
103         negvsi2 \
104         negvti2 \
105         paritydi2 \
106         paritysi2 \
107         parityti2 \
108         popcountdi2 \
109         popcountsi2 \
110         popcountti2 \
111         powidf2 \
112         powisf2 \
113         powitf2 \
114         powixf2 \
115         subvdi3 \
116         subvsi3 \
117         subvti3 \
118         trampoline_setup \
119         ucmpdi2 \
120         ucmpti2 \
121         udivdi3 \
122         udivmoddi4 \
123         udivmodsi4 \
124         udivmodti4 \
125         udivti3 \
126         umoddi3 \
127         umodti3
128
129 # These are already shipped by libc.a on arm and mips
130 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
131 SRCF+=  adddf3 \
132         addsf3 \
133         divdf3 \
134         divsf3 \
135         extendsfdf2 \
136         fixdfsi \
137         fixsfsi \
138         floatsidf \
139         floatsisf \
140         muldf3 \
141         mulsf3 \
142         subdf3 \
143         subsf3 \
144         truncdfsf2
145 .endif
146
147 .if ${MACHINE_CPUARCH} != "mips" && \
148     (${MACHINE_CPUARCH} != "arm" || ${MK_ARM_EABI} != "no")
149 SRCF+=  divsi3 \
150         modsi3 \
151         udivsi3 \
152         umodsi3
153 .endif
154
155 # FreeBSD-specific atomic intrinsics.
156 .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "armv6"
157 .PATH: ${.CURDIR}/../../sys/arm/arm
158
159 SRCF+=  stdatomic
160 CFLAGS+=        -DEMIT_SYNC_ATOMICS
161 .elif ${MACHINE_CPUARCH} == "mips"
162 .PATH: ${.CURDIR}/../../sys/mips/mips
163
164 SRCF+=  stdatomic
165 .endif
166
167 .for file in ${SRCF}
168 . if ${MACHINE_CPUARCH} != "arm" && exists(${CRTSRC}/${CRTARCH}/${file}.S)
169 SRCS+=  ${file}.S
170 . else
171 SRCS+=  ${file}.c
172 . endif
173 .endfor
174
175 .if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
176 SRCS+=  aeabi_idivmod.S \
177         aeabi_ldivmod.S \
178         aeabi_memcmp.S \
179         aeabi_memcpy.S \
180         aeabi_memmove.S \
181         aeabi_memset.S \
182         aeabi_uidivmod.S \
183         aeabi_uldivmod.S
184 .endif
185
186 .if ${MK_INSTALLLIB} != "no"
187 SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a
188 .endif
189 .if ${MK_PROFILE} != "no"
190 SYMLINKS+=libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a
191 .endif
192
193 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \
194     ${MACHINE_CPUARCH} == "powerpc"
195 AFLAGS+=--noexecstack
196 ACFLAGS+=-Wa,--noexecstack
197 .endif
198
199
200 .include <bsd.lib.mk>