Commit | Line | Data |
---|---|---|
5a6f7e2d ILT |
1 | # Process this file with automake to generate Makefile.in |
2 | ||
537b5f51 ILT |
3 | # As far as I can tell automake testing support assumes that the build |
4 | # system and the host system are the same. So these tests will not | |
5 | # work when building with a cross-compiler. | |
6 | ||
5a6f7e2d ILT |
7 | AUTOMAKE_OPTIONS = |
8 | ||
f958d5fc ILT |
9 | # The two_file_test tests -fmerge-constants, so we simply always turn |
10 | # it on. This may need to be controlled by a configure option | |
11 | # eventually. | |
12 | AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CXXFLAGS) -fmerge-constants | |
5a6f7e2d | 13 | |
fa99aa09 | 14 | INCLUDES = \ |
5a6f7e2d ILT |
15 | -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../../include \ |
16 | -I$(srcdir)/../../elfcpp \ | |
17 | -DLOCALEDIR="\"$(datadir)/locale\"" \ | |
18 | @INCINTL@ | |
19 | ||
fe9a4c12 ILT |
20 | if THREADS |
21 | THREADSLIB = -lpthread | |
22 | endif | |
23 | ||
f0323c2f ILT |
24 | check_SCRIPTS = debug_msg.sh |
25 | check_DATA = | |
26 | ||
a360aedd | 27 | TESTS = object_unittest |
a360aedd | 28 | |
22dc1b09 | 29 | if GCC |
a360aedd | 30 | |
e2827e5f | 31 | if NATIVE_LINKER |
f0323c2f | 32 | |
1ce71f59 ILT |
33 | TESTS += debug_msg.sh |
34 | ||
35 | # TESTS += undef_symbol.sh | |
f0323c2f | 36 | |
e2827e5f | 37 | check_DATA += debug_msg.err undef_symbol.err |
d5026652 | 38 | |
3bd52c28 ILT |
39 | NATIVE_PROGS = \ |
40 | constructor_test \ | |
41 | constructor_static_test \ | |
42 | two_file_test \ | |
f958d5fc ILT |
43 | two_file_static_test \ |
44 | two_file_pic_test \ | |
3bd52c28 ILT |
45 | two_file_shared_1_test \ |
46 | two_file_shared_2_test \ | |
386c048c ILT |
47 | two_file_shared_1_pic_2_test \ |
48 | two_file_shared_2_pic_1_test \ | |
3bd52c28 ILT |
49 | two_file_same_shared_test \ |
50 | two_file_separate_shared_12_test \ | |
51 | two_file_separate_shared_21_test \ | |
3151305a ILT |
52 | exception_test \ |
53 | exception_static_test \ | |
54 | exception_shared_1_test \ | |
55 | exception_shared_2_test \ | |
56 | exception_same_shared_test \ | |
57 | exception_separate_shared_12_test \ | |
a360aedd ILT |
58 | exception_separate_shared_21_test \ |
59 | weak_test | |
3bd52c28 | 60 | |
63402fe4 ILT |
61 | if FN_PTRS_IN_SO_WITHOUT_PIC |
62 | ||
63 | NATIVE_PROGS += \ | |
64 | two_file_shared_1_nonpic_test \ | |
65 | two_file_shared_2_nonpic_test \ | |
66 | two_file_same_shared_nonpic_test \ | |
67 | two_file_separate_shared_12_nonpic_test \ | |
68 | two_file_separate_shared_21_nonpic_test | |
69 | ||
70 | endif | |
71 | ||
6eee141f ILT |
72 | if TLS |
73 | ||
74 | NATIVE_PROGS += \ | |
75 | tls_test \ | |
76 | tls_pic_test \ | |
6eee141f ILT |
77 | tls_shared_test |
78 | ||
097ec620 ILT |
79 | if STATIC_TLS |
80 | ||
81 | NATIVE_PROGS += \ | |
82 | tls_static_test \ | |
83 | tls_static_pic_test | |
84 | ||
85 | endif | |
86 | ||
6eee141f ILT |
87 | if FN_PTRS_IN_SO_WITHOUT_PIC |
88 | ||
89 | NATIVE_PROGS += \ | |
90 | tls_shared_nonpic_test | |
91 | ||
92 | endif | |
93 | endif | |
94 | ||
56ba9a23 ILT |
95 | NATIVE_TESTING = \ |
96 | basic_test \ | |
97 | basic_pic_test \ | |
98 | basic_static_test \ | |
d5026652 | 99 | basic_static_pic_test \ |
3bd52c28 | 100 | $(NATIVE_PROGS) |
d5026652 | 101 | |
22dc1b09 ILT |
102 | endif |
103 | endif | |
104 | ||
a360aedd | 105 | TESTS += $(NATIVE_TESTING) |
5a6f7e2d ILT |
106 | |
107 | check_LIBRARIES = libgoldtest.a | |
108 | libgoldtest_a_SOURCES = test.cc testmain.cc testfile.cc | |
109 | ||
ad2d6943 ILT |
110 | DEPENDENCIES = \ |
111 | libgoldtest.a ../libgold.a ../../libiberty/libiberty.a $(LIBINTL_DEP) | |
fe9a4c12 ILT |
112 | LDADD = libgoldtest.a ../libgold.a ../../libiberty/libiberty.a $(LIBINTL) \ |
113 | $(THREADSLIB) | |
5a6f7e2d | 114 | |
d5026652 | 115 | check_PROGRAMS = object_unittest $(NATIVE_PROGS) |
5a6f7e2d ILT |
116 | |
117 | object_unittest_SOURCES = object_unittest.cc | |
22dc1b09 ILT |
118 | |
119 | if GCC | |
a360aedd | 120 | |
e2827e5f ILT |
121 | if NATIVE_LINKER |
122 | ||
123 | gcctestdir/ld: ../ld-new | |
124 | test -d gcctestdir || mkdir -p gcctestdir | |
125 | rm -f gcctestdir/ld | |
126 | (cd gcctestdir && $(LN_S) ../../ld-new ld) | |
127 | ||
f0323c2f | 128 | debug_msg.o: debug_msg.cc |
d12348b8 | 129 | $(CXXCOMPILE) -O0 -g -c -w -o $@ $(srcdir)/debug_msg.cc |
a55ce7fe ILT |
130 | odr_violation1.o: odr_violation1.cc |
131 | $(CXXCOMPILE) -O0 -g -c -w -o $@ $(srcdir)/odr_violation1.cc | |
132 | odr_violation2.o: odr_violation2.cc | |
133 | $(CXXCOMPILE) -O0 -g -c -w -o $@ $(srcdir)/odr_violation2.cc | |
e2827e5f ILT |
134 | debug_msg.err: debug_msg.o odr_violation1.o odr_violation2.o gcctestdir/ld |
135 | @echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o "2>$@" | |
136 | @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o 2>$@; \ | |
f0323c2f | 137 | then \ |
e2827e5f | 138 | echo 1>&2 "Link of debug_msg.o should have failed"; \ |
f0323c2f ILT |
139 | exit 1; \ |
140 | fi | |
141 | ||
e2827e5f ILT |
142 | undef_symbol.o: undef_symbol.cc |
143 | $(CXXCOMPILE) -O0 -g -c -fPIC $< | |
144 | undef_symbol.so: undef_symbol.o | |
145 | $(CXXLINK) -shared undef_symbol.o | |
146 | undef_symbol.err: undef_symbol_main.o undef_symbol.so gcctestdir/ld | |
147 | @echo $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so "2>$@" | |
148 | @if $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so 2>$@; \ | |
149 | then \ | |
150 | echo 1>&2 "Link of undef_symbol_test should have failed"; \ | |
151 | exit 1; \ | |
152 | fi | |
22dc1b09 ILT |
153 | |
154 | # Override the default CXXFLAGS--we don't want any optimization | |
56ba9a23 | 155 | basic_test.o: basic_test.cc |
22dc1b09 | 156 | $(CXXCOMPILE) -O0 -c -o $@ $< |
56ba9a23 ILT |
157 | basic_test: basic_test.o gcctestdir/ld |
158 | $(CXXLINK) -Bgcctestdir/ basic_test.o | |
159 | basic_static_test: basic_test.o gcctestdir/ld | |
160 | $(CXXLINK) -Bgcctestdir/ -static basic_test.o | |
22dc1b09 | 161 | |
56ba9a23 | 162 | basic_pic_test.o: basic_test.cc |
22dc1b09 | 163 | $(CXXCOMPILE) -O0 -c -fpic -o $@ $< |
56ba9a23 ILT |
164 | basic_pic_test: basic_pic_test.o gcctestdir/ld |
165 | $(CXXLINK) -Bgcctestdir/ basic_pic_test.o | |
166 | basic_static_pic_test: basic_pic_test.o gcctestdir/ld | |
167 | $(CXXLINK) -Bgcctestdir/ -static basic_pic_test.o | |
22dc1b09 | 168 | |
d5026652 ILT |
169 | constructor_test_SOURCES = constructor_test.cc |
170 | constructor_test_DEPENDENCIES = gcctestdir/ld | |
171 | constructor_test_LDFLAGS = -Bgcctestdir/ | |
172 | ||
cb615bc1 ILT |
173 | constructor_static_test_SOURCES = constructor_test.cc |
174 | constructor_static_test_DEPENDENCIES = gcctestdir/ld | |
175 | constructor_static_test_LDFLAGS = -Bgcctestdir/ -static | |
176 | ||
3bd52c28 ILT |
177 | two_file_test_SOURCES = \ |
178 | two_file_test_1.cc \ | |
179 | two_file_test_2.cc \ | |
180 | two_file_test_main.cc \ | |
181 | two_file_test.h | |
182 | two_file_test_DEPENDENCIES = gcctestdir/ld | |
183 | two_file_test_LDFLAGS = -Bgcctestdir/ | |
184 | ||
f958d5fc ILT |
185 | two_file_static_test_SOURCES = \ |
186 | two_file_test_1.cc two_file_test_2.cc two_file_test_main.cc | |
187 | two_file_static_test_DEPENDENCIES = gcctestdir/ld | |
188 | two_file_static_test_LDFLAGS = -Bgcctestdir/ -static | |
189 | ||
190 | two_file_pic_test_SOURCES = two_file_test_main.cc | |
191 | two_file_pic_test_DEPENDENCIES = \ | |
192 | gcctestdir/ld two_file_test_1_pic.o two_file_test_2_pic.o | |
193 | two_file_pic_test_LDFLAGS = -Bgcctestdir/ | |
194 | two_file_pic_test_LDADD = two_file_test_1_pic.o two_file_test_2_pic.o | |
195 | ||
3bd52c28 ILT |
196 | two_file_shared_1_test_SOURCES = two_file_test_2.cc two_file_test_main.cc |
197 | two_file_shared_1_test_DEPENDENCIES = gcctestdir/ld two_file_shared_1.so | |
198 | two_file_shared_1_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
199 | two_file_shared_1_test_LDADD = two_file_shared_1.so | |
200 | ||
201 | two_file_shared_2_test_SOURCES = two_file_test_1.cc two_file_test_main.cc | |
202 | two_file_shared_2_test_DEPENDENCIES = gcctestdir/ld two_file_shared_2.so | |
203 | two_file_shared_2_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
204 | two_file_shared_2_test_LDADD = two_file_shared_2.so | |
205 | ||
386c048c ILT |
206 | two_file_shared_1_pic_2_test_SOURCES = two_file_test_main.cc |
207 | two_file_shared_1_pic_2_test_DEPENDENCIES = \ | |
208 | gcctestdir/ld two_file_shared_1.so two_file_test_1_pic.o | |
209 | two_file_shared_1_pic_2_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
210 | two_file_shared_1_pic_2_test_LDADD = two_file_test_1_pic.o two_file_shared_2.so | |
211 | ||
212 | two_file_shared_2_pic_1_test_SOURCES = two_file_test_main.cc | |
213 | two_file_shared_2_pic_1_test_DEPENDENCIES = \ | |
214 | gcctestdir/ld two_file_shared_2.so two_file_test_2_pic.o | |
215 | two_file_shared_2_pic_1_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
216 | two_file_shared_2_pic_1_test_LDADD = two_file_test_2_pic.o two_file_shared_1.so | |
217 | ||
3bd52c28 ILT |
218 | two_file_same_shared_test_SOURCES = two_file_test_main.cc |
219 | two_file_same_shared_test_DEPENDENCIES = gcctestdir/ld two_file_shared.so | |
220 | two_file_same_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
221 | two_file_same_shared_test_LDADD = two_file_shared.so | |
222 | ||
223 | two_file_separate_shared_12_test_SOURCES = two_file_test_main.cc | |
224 | two_file_separate_shared_12_test_DEPENDENCIES = \ | |
225 | gcctestdir/ld two_file_shared_1.so two_file_shared_2.so | |
226 | two_file_separate_shared_12_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
227 | two_file_separate_shared_12_test_LDADD = \ | |
228 | two_file_shared_1.so two_file_shared_2.so | |
229 | ||
230 | two_file_separate_shared_21_test_SOURCES = two_file_test_main.cc | |
231 | two_file_separate_shared_21_test_DEPENDENCIES = \ | |
232 | gcctestdir/ld two_file_shared_1.so two_file_shared_2.so | |
233 | two_file_separate_shared_21_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
234 | two_file_separate_shared_21_test_LDADD = \ | |
235 | two_file_shared_2.so two_file_shared_1.so | |
236 | ||
63402fe4 ILT |
237 | two_file_test_1_pic.o: two_file_test_1.cc |
238 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
239 | two_file_test_2_pic.o: two_file_test_2.cc | |
240 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
241 | ||
242 | two_file_shared_1.so: two_file_test_1_pic.o | |
243 | $(CXXLINK) -shared two_file_test_1_pic.o | |
244 | two_file_shared_2.so: two_file_test_2_pic.o | |
245 | $(CXXLINK) -shared two_file_test_2_pic.o | |
246 | two_file_shared.so: two_file_test_1_pic.o two_file_test_2_pic.o | |
247 | $(CXXLINK) -shared two_file_test_1_pic.o two_file_test_2_pic.o | |
248 | ||
249 | # The nonpic tests will fail on platforms which can not put non-PIC | |
250 | # code into shared libraries, so we just don't run them in that case. | |
251 | ||
252 | if FN_PTRS_IN_SO_WITHOUT_PIC | |
3bd52c28 ILT |
253 | |
254 | two_file_shared_1_nonpic_test_SOURCES = \ | |
255 | two_file_test_2.cc two_file_test_main.cc | |
256 | two_file_shared_1_nonpic_test_DEPENDENCIES = \ | |
257 | gcctestdir/ld two_file_shared_1_nonpic.so | |
258 | two_file_shared_1_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
259 | two_file_shared_1_nonpic_test_LDADD = two_file_shared_1_nonpic.so | |
260 | ||
261 | two_file_shared_2_nonpic_test_SOURCES = \ | |
262 | two_file_test_1.cc two_file_test_main.cc | |
263 | two_file_shared_2_nonpic_test_DEPENDENCIES = \ | |
264 | gcctestdir/ld two_file_shared_2_nonpic.so | |
265 | two_file_shared_2_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
266 | two_file_shared_2_nonpic_test_LDADD = two_file_shared_2_nonpic.so | |
267 | ||
268 | two_file_same_shared_nonpic_test_SOURCES = two_file_test_main.cc | |
269 | two_file_same_shared_nonpic_test_DEPENDENCIES = \ | |
270 | gcctestdir/ld two_file_shared_nonpic.so | |
271 | two_file_same_shared_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
272 | two_file_same_shared_nonpic_test_LDADD = two_file_shared_nonpic.so | |
273 | ||
274 | two_file_separate_shared_12_nonpic_test_SOURCES = two_file_test_main.cc | |
275 | two_file_separate_shared_12_nonpic_test_DEPENDENCIES = \ | |
276 | gcctestdir/ld two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so | |
277 | two_file_separate_shared_12_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
278 | two_file_separate_shared_12_nonpic_test_LDADD = \ | |
279 | two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so | |
280 | ||
281 | two_file_separate_shared_21_nonpic_test_SOURCES = two_file_test_main.cc | |
282 | two_file_separate_shared_21_nonpic_test_DEPENDENCIES = \ | |
283 | gcctestdir/ld two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so | |
284 | two_file_separate_shared_21_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
285 | two_file_separate_shared_21_nonpic_test_LDADD = \ | |
286 | two_file_shared_2_nonpic.so two_file_shared_1_nonpic.so | |
287 | ||
3bd52c28 ILT |
288 | two_file_shared_1_nonpic.so: two_file_test_1.o |
289 | $(CXXLINK) -shared two_file_test_1.o | |
290 | two_file_shared_2_nonpic.so: two_file_test_2.o | |
291 | $(CXXLINK) -shared two_file_test_2.o | |
292 | two_file_shared_nonpic.so: two_file_test_1.o two_file_test_2.o | |
293 | $(CXXLINK) -shared two_file_test_1.o two_file_test_2.o | |
294 | ||
63402fe4 ILT |
295 | endif |
296 | ||
3151305a ILT |
297 | exception_test_SOURCES = \ |
298 | exception_test_main.cc \ | |
299 | exception_test_1.cc \ | |
300 | exception_test_2.cc \ | |
301 | exception_test.h | |
302 | exception_test_DEPENDENCIES = gcctestdir/ld | |
303 | exception_test_LDFLAGS = -Bgcctestdir/ | |
304 | ||
305 | exception_static_test_SOURCES = \ | |
306 | exception_test_main.cc \ | |
307 | exception_test_1.cc \ | |
308 | exception_test_2.cc | |
309 | exception_static_test_DEPENDENCIES = gcctestdir/ld | |
310 | exception_static_test_LDFLAGS = -Bgcctestdir/ -static | |
311 | ||
312 | exception_shared_1_test_SOURCES = exception_test_2.cc exception_test_main.cc | |
313 | exception_shared_1_test_DEPENDENCIES = gcctestdir/ld exception_shared_1.so | |
314 | exception_shared_1_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
315 | exception_shared_1_test_LDADD = exception_shared_1.so | |
316 | ||
317 | exception_shared_2_test_SOURCES = exception_test_1.cc exception_test_main.cc | |
318 | exception_shared_2_test_DEPENDENCIES = gcctestdir/ld exception_shared_2.so | |
319 | exception_shared_2_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
320 | exception_shared_2_test_LDADD = exception_shared_2.so | |
321 | ||
322 | exception_same_shared_test_SOURCES = exception_test_main.cc | |
323 | exception_same_shared_test_DEPENDENCIES = gcctestdir/ld exception_shared.so | |
324 | exception_same_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
325 | exception_same_shared_test_LDADD = exception_shared.so | |
326 | ||
327 | exception_separate_shared_12_test_SOURCES = exception_test_main.cc | |
328 | exception_separate_shared_12_test_DEPENDENCIES = \ | |
329 | gcctestdir/ld exception_shared_1.so exception_shared_2.so | |
330 | exception_separate_shared_12_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
331 | exception_separate_shared_12_test_LDADD = \ | |
332 | exception_shared_1.so exception_shared_2.so | |
333 | ||
334 | exception_separate_shared_21_test_SOURCES = exception_test_main.cc | |
335 | exception_separate_shared_21_test_DEPENDENCIES = \ | |
336 | gcctestdir/ld exception_shared_1.so exception_shared_2.so | |
337 | exception_separate_shared_21_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
338 | exception_separate_shared_21_test_LDADD = \ | |
339 | exception_shared_2.so exception_shared_1.so | |
340 | ||
341 | exception_test_1_pic.o: exception_test_1.cc | |
342 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
343 | exception_test_2_pic.o: exception_test_2.cc | |
344 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
345 | ||
346 | exception_shared_1.so: exception_test_1_pic.o | |
347 | $(CXXLINK) -shared exception_test_1_pic.o | |
348 | exception_shared_2.so: exception_test_2_pic.o | |
349 | $(CXXLINK) -shared exception_test_2_pic.o | |
350 | exception_shared.so: exception_test_1_pic.o exception_test_2_pic.o | |
351 | $(CXXLINK) -shared exception_test_1_pic.o exception_test_2_pic.o | |
352 | ||
a360aedd ILT |
353 | weak_test_SOURCES = weak_test.cc |
354 | weak_test_LDFLAGS = -Bgcctestdir/ | |
355 | ||
6eee141f ILT |
356 | if TLS |
357 | ||
e0374858 | 358 | tls_test_SOURCES = tls_test.cc tls_test_file2.cc tls_test_main.cc tls_test.h |
6eee141f ILT |
359 | tls_test_DEPENDENCIES = gcctestdir/ld |
360 | tls_test_LDFLAGS = -Bgcctestdir/ | |
361 | tls_test_LDADD = -lpthread | |
362 | ||
363 | tls_pic_test_SOURCES = tls_test_main.cc | |
e0374858 | 364 | tls_pic_test_DEPENDENCIES = gcctestdir/ld tls_test_pic.o tls_test_file2_pic.o |
6eee141f | 365 | tls_pic_test_LDFLAGS = -Bgcctestdir/ |
e0374858 | 366 | tls_pic_test_LDADD = tls_test_pic.o tls_test_file2_pic.o -lpthread |
6eee141f | 367 | |
e0374858 | 368 | tls_static_test_SOURCES = tls_test.cc tls_test_file2.cc tls_test_main.cc |
6eee141f ILT |
369 | tls_static_test_DEPENDENCIES = gcctestdir/ld |
370 | tls_static_test_LDFLAGS = -Bgcctestdir/ -static | |
371 | tls_static_test_LDADD = -lpthread | |
372 | ||
373 | tls_static_pic_test_SOURCES = tls_test_main.cc | |
e0374858 | 374 | tls_static_pic_test_DEPENDENCIES = gcctestdir/ld tls_test_pic.o tls_test_file2_pic.o |
6eee141f | 375 | tls_static_pic_test_LDFLAGS = -Bgcctestdir/ -static |
e0374858 | 376 | tls_static_pic_test_LDADD = tls_test_pic.o tls_test_file2_pic.o -lpthread |
6eee141f ILT |
377 | |
378 | tls_shared_test_SOURCES = tls_test_main.cc | |
379 | tls_shared_test_DEPENDENCIES = gcctestdir/ld tls_test_shared.so | |
380 | tls_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
381 | tls_shared_test_LDADD = tls_test_shared.so -lpthread | |
382 | ||
383 | tls_test_pic.o: tls_test.cc | |
384 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
385 | ||
e0374858 ILT |
386 | tls_test_file2_pic.o: tls_test_file2.cc |
387 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
388 | ||
389 | tls_test_shared.so: tls_test_pic.o tls_test_file2_pic.o | |
390 | $(CXXLINK) -shared tls_test_pic.o tls_test_file2_pic.o | |
6eee141f ILT |
391 | |
392 | if FN_PTRS_IN_SO_WITHOUT_PIC | |
393 | ||
394 | tls_shared_nonpic_test_SOURCES = tls_test_main.cc | |
395 | tls_shared_nonpic_test_DEPENDENCIES = gcctestdir/ld tls_test_shared_nonpic.so | |
396 | tls_shared_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
397 | tls_shared_nonpic_test_LDADD = tls_test_shared_nonpic.so -lpthread | |
398 | ||
e0374858 ILT |
399 | tls_test_shared_nonpic.so: tls_test.o tls_test_file2.o |
400 | $(CXXLINK) -shared tls_test.o tls_test_file2.o | |
6eee141f ILT |
401 | |
402 | endif | |
403 | ||
404 | endif | |
405 | ||
22dc1b09 ILT |
406 | endif |
407 | endif |