Print this page
8609 want a position independent CRT
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libc/Makefile.targ
+++ new/usr/src/lib/libc/Makefile.targ
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 # Copyright 2016 Joyent, Inc.
25 25 #
26 26 #
27 27
28 28 # libc build rules
29 29
30 30 #
31 31 # This first rule picks up optimized sources for libc variants.
32 32 #
33 33 pics/%.o: $(OPTIMIZED_LIBCBASE)/gen/%.s
34 34 $(BUILD.s)
35 35 $(POST_PROCESS_O)
36 36
37 37 pics/%.o: $(LIBCBASE)/crt/%.c
38 38 $(COMPILE.c) -o $@ $<
39 39 $(POST_PROCESS_O)
40 40
41 41 pics/%.o: $(LIBCBASE)/crt/%.s
42 42 $(BUILD.s)
43 43 $(POST_PROCESS_O)
44 44
45 45 pics/%.o: $(LIBCBASE)/gen/%.c
46 46 $(COMPILE.c) -o $@ $<
47 47 $(POST_PROCESS_O)
48 48
49 49 pics/%.o: $(LIBCBASE)/gen/%.s
50 50 $(BUILD.s)
51 51 $(POST_PROCESS_O)
52 52
53 53 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/%.s
54 54 $(BUILD.s)
55 55 $(POST_PROCESS_O)
56 56
57 57 pics/_stack_grow.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s
58 58 $(BUILD.s) $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s
59 59 $(POST_PROCESS_O)
60 60
61 61 pics/%.o: $(LIBCBASE)/fp/%.c
62 62 $(COMPILE.c) -o $@ $<
63 63 $(POST_PROCESS_O)
64 64
65 65 pics/%.o: $(LIBCBASE)/../$(MACH)/fp/%.c
66 66 $(COMPILE.c) -o $@ $<
67 67 $(POST_PROCESS_O)
68 68
69 69 pics/%.o: $(LIBCBASE)/fp/%.s
70 70 $(BUILD.s)
71 71 $(POST_PROCESS_O)
72 72
73 73 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.c
74 74 $(COMPILE.c) -o $@ $<
75 75 $(POST_PROCESS_O)
76 76
77 77 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.s
78 78 $(BUILD.s)
79 79 $(POST_PROCESS_O)
80 80
81 81 pics/%.o: $(LIBCBASE)/sys/%.c
82 82 $(COMPILE.c) -o $@ $<
83 83 $(POST_PROCESS_O)
84 84
85 85 pics/%.o: $(LIBCBASE)/../common/sys/%.s
86 86 $(BUILD.s)
87 87 $(POST_PROCESS_O)
88 88
89 89 pics/%.o: $(LIBCBASE)/sys/%.s
90 90 $(BUILD.s)
91 91 $(POST_PROCESS_O)
92 92
93 93 pics/%.o: $(LIBCBASE)/../$(MACH)/sys/%.s
94 94 $(BUILD.s)
95 95 $(POST_PROCESS_O)
96 96
97 97 pics/%.o: $(LIBCBASE)/../$(MACH)/sys/%.c
98 98 $(COMPILE.c) -o $@ $<
99 99 $(POST_PROCESS_O)
100 100
101 101 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.c
102 102 $(COMPILE.c) -o $@ $<
103 103 $(POST_PROCESS_O)
104 104
105 105 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.s
106 106 $(BUILD.s)
107 107 $(POST_PROCESS_O)
108 108
109 109 # rules to build large file aware objects (xxx64.o from xxx.s or xxx.c)
110 110
111 111 pics/%64.o: $(LIBCBASE)/../common/sys/%.s
112 112 $(BUILD.s)
113 113 $(POST_PROCESS_O)
114 114
115 115 pics/%64.o: $(LIBCBASE)/sys/%.s
116 116 $(BUILD.s)
117 117 $(POST_PROCESS_O)
118 118
119 119 pics/%64.o: $(LIBCBASE)/gen/%.c
120 120 $(COMPILE.c) -o $@ $<
121 121 $(POST_PROCESS_O)
122 122
123 123 pics/%64.o: $(LIBCBASE)/../port/gen/%.c
124 124 $(COMPILE.c) -o $@ $<
125 125 $(POST_PROCESS_O)
126 126
127 127 pics/%64.o: $(LIBCBASE)/../port/sys/%.c
128 128 $(COMPILE.c) -o $@ $<
129 129 $(POST_PROCESS_O)
130 130
131 131 pics/%64.o: $(LIBCBASE)/../port/print/%.c
132 132 $(COMPILE.c) -o $@ $<
133 133 $(POST_PROCESS_O)
134 134
135 135 pics/%64.o: $(LIBCBASE)/../port/regex/%.c
136 136 $(COMPILE.c) -DM_I18N_MB -DI18N \
137 137 -I$(LIBCBASE)/../port/regex \
138 138 -I$(LIBCBASE)/../port/gen -o $@ $<
139 139 $(POST_PROCESS_O)
140 140
141 141 pics/%64.o: $(LIBCBASE)/../port/stdio/%.c
142 142 $(COMPILE.c) -o $@ $<
143 143 $(POST_PROCESS_O)
144 144
145 145 pics/%_w.o: $(LIBCBASE)/../port/stdio/%.c
146 146 $(COMPILE.c) -o $@ $<
147 147 $(POST_PROCESS_O)
148 148
149 149 pics/%_w.o: $(LIBCBASE)/../port/print/%.c
150 150 $(COMPILE.c) -o $@ $<
151 151 $(POST_PROCESS_O)
152 152
153 153 pics/%_pos.o: $(LIBCBASE)/../port/i18n/%.c
154 154 $(COMPILE.c) -o $@ $<
155 155 $(POST_PROCESS_O)
156 156
157 157 pics/%_sbyte.o: $(LIBCBASE)/../port/i18n/%.c
158 158 $(COMPILE.c) -o $@ $<
159 159 $(POST_PROCESS_O)
160 160
161 161 pics/%_possbyte.o: $(LIBCBASE)/../port/i18n/%.c
162 162 $(COMPILE.c) -o $@ $<
163 163 $(POST_PROCESS_O)
164 164
165 165 pics/%_longlong.o: $(LIBCBASE)/../port/i18n/%.c
166 166 $(COMPILE.c) -o $@ $<
167 167 $(POST_PROCESS_O)
168 168
169 169 # libc build rules for objects built from "portable" source in ../port
170 170
171 171 pics/%.o: $(LIBCBASE)/../port/fp/%.c
172 172 $(COMPILE.c) \
173 173 -I$(LIBCBASE)/../port/fp -o $@ $<
174 174 $(POST_PROCESS_O)
175 175
176 176 pics/%.o: $(LIBCBASE)/../port/i18n/%.c
177 177 $(COMPILE.c) \
178 178 -I$(LIBCBASE)/../port/i18n -o $@ $<
179 179 $(POST_PROCESS_O)
180 180
181 181 # gen rules
182 182 pics/%.o %.o: $(LIBCBASE)/../port/gen/%.c
183 183 $(COMPILE.c) -o $@ $<
184 184 $(POST_PROCESS_O)
185 185
186 186 # locale rules
187 187 pics/%.o %.o: $(LIBCBASE)/../port/locale/%.c
188 188 $(COMPILE.c) -o $@ $<
189 189 $(POST_PROCESS_O)
190 190
191 191 # print rules
192 192 pics/%.o: $(LIBCBASE)/../port/print/%.c
193 193 $(COMPILE.c) -o $@ $<
194 194 $(POST_PROCESS_O)
195 195
196 196 # regex rules
197 197 pics/%.o: $(LIBCBASE)/../port/regex/%.c
198 198 $(COMPILE.c) -DM_I18N_MB -DI18N \
199 199 -I$(LIBCBASE)/../port/regex \
200 200 -I$(LIBCBASE)/../port/gen -o $@ $<
201 201 $(POST_PROCESS_O)
202 202
203 203 # stdio rules
204 204 pics/%.o: $(LIBCBASE)/../port/stdio/%.c
205 205 $(COMPILE.c) -o $@ $<
206 206 $(POST_PROCESS_O)
207 207
208 208 # c89 print, stdio rules
209 209 pics/%_c89.o: $(LIBCBASE)/../port/print/%.c
210 210 $(COMPILE.c) -o $@ $<
211 211 $(POST_PROCESS_O)
212 212
213 213 pics/%_c89.o: $(LIBCBASE)/../port/stdio/%.c
214 214 $(COMPILE.c) -o $@ $<
215 215 $(POST_PROCESS_O)
216 216
217 217 # aio rules
218 218 pics/%.o: $(LIBCBASE)/../port/aio/%.c
219 219 $(COMPILE.c) -o $@ $<
220 220 $(POST_PROCESS_O)
221 221
222 222 # rt rules
223 223 pics/%.o: $(LIBCBASE)/../port/rt/%.c
224 224 $(COMPILE.c) -o $@ $<
225 225 $(POST_PROCESS_O)
226 226
227 227 # tpool rules
228 228 pics/%.o: $(LIBCBASE)/../port/tpool/%.c
229 229 $(COMPILE.c) -o $@ $<
230 230 $(POST_PROCESS_O)
231 231
232 232 # threads rules
233 233 pics/%.o: $(LIBCBASE)/../port/threads/%.c
234 234 $(COMPILE.c) -o $@ $<
235 235 $(POST_PROCESS_O)
236 236
237 237 pics/%.o: $(LIBCBASE)/threads/%.c
238 238 $(COMPILE.c) -o $@ $<
239 239 $(POST_PROCESS_O)
240 240
241 241 pics/%.o: $(LIBCBASE)/threads/%.s
242 242 $(BUILD.s)
243 243 $(POST_PROCESS_O)
244 244
245 245 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.c
246 246 $(COMPILE.c) -o $@ $<
247 247 $(POST_PROCESS_O)
248 248
249 249 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.s
250 250 $(BUILD.s)
251 251 $(POST_PROCESS_O)
252 252
253 253 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.c
254 254 $(COMPILE.c) -o $@ $<
255 255 $(POST_PROCESS_O)
256 256
257 257 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.s
258 258 $(BUILD.s)
259 259 $(POST_PROCESS_O)
260 260
261 261 pics/%.o: $(LIBCBASE)/../port/unwind/%.c
262 262 $(COMPILE.c) -o $@ $<
↓ open down ↓ |
262 lines elided |
↑ open up ↑ |
263 263 $(POST_PROCESS_O)
264 264
265 265 pics/%.o: $(LIBCBASE)/../$(MACH)/unwind/%.s
266 266 $(BUILD.s)
267 267 $(POST_PROCESS_O)
268 268
269 269 pics/%.o: $(LIBCBASE)/../port/sys/%.c
270 270 $(COMPILE.c) -o $@ $<
271 271 $(POST_PROCESS_O)
272 272
273 -pics/%.o: $(LIBCBASE)/../../common/common/%.c
273 +pics/%.o: $(LIBCBASE)/../../crt/common/%.c
274 274 $(COMPILE.c) -o $@ $<
275 275 $(POST_PROCESS_O)
276 276
277 277 pics/%.o: $(LIBCBASE)/$(CRTSRCS)/%.s
278 278 $(BUILD.s)
279 279 $(POST_PROCESS_O)
280 280
281 281 # $(SRC)/common rules
282 282 pics/%.o: $(SRC)/common/atomic/$(TARGETMACH)/%.s
283 283 $(BUILD.s)
284 284 $(POST_PROCESS_O)
285 285
286 286 $(COMOBJS:%=pics/%): $(SRC)/common/util/$$(@F:.o=.c)
287 287 $(COMPILE.c) -o $@ $(SRC)/common/util/$(@F:.o=.c)
288 288 $(POST_PROCESS_O)
289 289
290 290 $(XATTROBJS:%=pics/%): $(SRC)/common/xattr/$$(@F:.o=.c)
291 291 $(COMPILE.c) -o $@ $(SRC)/common/xattr/$(@F:.o=.c)
292 292 $(POST_PROCESS_O)
293 293
294 294 $(DTRACEOBJS:%=pics/%): $(SRC)/common/dtrace/$$(@F:.o=.c)
295 295 $(COMPILE.c) -o $@ $(SRC)/common/dtrace/$(@F:.o=.c)
296 296 $(POST_PROCESS_O)
297 297
298 298 $(SECFLAGSOBJS:%=pics/%): $(SRC)/common/secflags/$$(@F:.o=.c)
299 299 $(COMPILE.c) -o $@ $(SRC)/common/secflags/$(@F:.o=.c)
300 300 $(POST_PROCESS_O)
301 301
302 302 $(UNICODEOBJS:%=pics/%): $(SRC)/common/unicode/$$(@F:.o=.c)
303 303 $(COMPILE.c) -o $@ $(SRC)/common/unicode/$(@F:.o=.c)
304 304 $(POST_PROCESS_O)
305 305
306 306 $(CHACHAOBJS:%=pics/%): $(SRC)/common/crypto/chacha/$$(@F:.o=.c)
307 307 $(COMPILE.c) -I$(SRC)/common/crypto/chacha -DKEYSTREAM_ONLY \
308 308 -o $@ $(SRC)/common/crypto/chacha/$(@F:.o=.c)
309 309 $(POST_PROCESS_O)
310 310
311 311 # DTrace rules
312 312 pics/%.o: $(LIBCBASE)/../port/threads/%.d $(THREADSOBJS:%=pics/%)
313 313 $(COMPILE.d) -C -xlazyload -s $< -o $@ $(THREADSOBJS:%=pics/%)
314 314 $(POST_PROCESS_O)
315 315
316 316 include $(SRC)/lib/Makefile.targ
↓ open down ↓ |
33 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX