]>
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 | |
9a2d6984 | 33 | TESTS += debug_msg.sh undef_symbol.sh |
1ce71f59 | 34 | |
79e052ea ILT |
35 | check_DATA += debug_msg.err debug_msg_so.err debug_msg_ndebug.err |
36 | check_DATA += undef_symbol.err | |
d5026652 | 37 | |
3bd52c28 ILT |
38 | NATIVE_PROGS = \ |
39 | constructor_test \ | |
40 | constructor_static_test \ | |
41 | two_file_test \ | |
f958d5fc ILT |
42 | two_file_static_test \ |
43 | two_file_pic_test \ | |
3bd52c28 ILT |
44 | two_file_shared_1_test \ |
45 | two_file_shared_2_test \ | |
386c048c ILT |
46 | two_file_shared_1_pic_2_test \ |
47 | two_file_shared_2_pic_1_test \ | |
3bd52c28 ILT |
48 | two_file_same_shared_test \ |
49 | two_file_separate_shared_12_test \ | |
50 | two_file_separate_shared_21_test \ | |
3151305a ILT |
51 | exception_test \ |
52 | exception_static_test \ | |
53 | exception_shared_1_test \ | |
54 | exception_shared_2_test \ | |
55 | exception_same_shared_test \ | |
56 | exception_separate_shared_12_test \ | |
a360aedd | 57 | exception_separate_shared_21_test \ |
43771f76 ILT |
58 | weak_test \ |
59 | flagstest_compress_debug_sections \ | |
60 | flagstest_o_specialfile \ | |
61 | flagstest_o_specialfile_and_compress_debug_sections | |
3bd52c28 | 62 | |
63402fe4 ILT |
63 | if FN_PTRS_IN_SO_WITHOUT_PIC |
64 | ||
65 | NATIVE_PROGS += \ | |
66 | two_file_shared_1_nonpic_test \ | |
67 | two_file_shared_2_nonpic_test \ | |
68 | two_file_same_shared_nonpic_test \ | |
69 | two_file_separate_shared_12_nonpic_test \ | |
70 | two_file_separate_shared_21_nonpic_test | |
71 | ||
72 | endif | |
73 | ||
6eee141f ILT |
74 | if TLS |
75 | ||
76 | NATIVE_PROGS += \ | |
77 | tls_test \ | |
78 | tls_pic_test \ | |
6eee141f ILT |
79 | tls_shared_test |
80 | ||
097ec620 ILT |
81 | if STATIC_TLS |
82 | ||
83 | NATIVE_PROGS += \ | |
84 | tls_static_test \ | |
85 | tls_static_pic_test | |
86 | ||
87 | endif | |
88 | ||
6eee141f ILT |
89 | if FN_PTRS_IN_SO_WITHOUT_PIC |
90 | ||
91 | NATIVE_PROGS += \ | |
92 | tls_shared_nonpic_test | |
93 | ||
94 | endif | |
95 | endif | |
96 | ||
56ba9a23 ILT |
97 | NATIVE_TESTING = \ |
98 | basic_test \ | |
99 | basic_pic_test \ | |
100 | basic_static_test \ | |
d5026652 | 101 | basic_static_pic_test \ |
3bd52c28 | 102 | $(NATIVE_PROGS) |
d5026652 | 103 | |
22dc1b09 ILT |
104 | endif |
105 | endif | |
106 | ||
a360aedd | 107 | TESTS += $(NATIVE_TESTING) |
5a6f7e2d ILT |
108 | |
109 | check_LIBRARIES = libgoldtest.a | |
110 | libgoldtest_a_SOURCES = test.cc testmain.cc testfile.cc | |
111 | ||
ad2d6943 ILT |
112 | DEPENDENCIES = \ |
113 | libgoldtest.a ../libgold.a ../../libiberty/libiberty.a $(LIBINTL_DEP) | |
fe9a4c12 ILT |
114 | LDADD = libgoldtest.a ../libgold.a ../../libiberty/libiberty.a $(LIBINTL) \ |
115 | $(THREADSLIB) | |
5a6f7e2d | 116 | |
d5026652 | 117 | check_PROGRAMS = object_unittest $(NATIVE_PROGS) |
5a6f7e2d ILT |
118 | |
119 | object_unittest_SOURCES = object_unittest.cc | |
22dc1b09 ILT |
120 | |
121 | if GCC | |
a360aedd | 122 | |
e2827e5f ILT |
123 | if NATIVE_LINKER |
124 | ||
125 | gcctestdir/ld: ../ld-new | |
126 | test -d gcctestdir || mkdir -p gcctestdir | |
127 | rm -f gcctestdir/ld | |
128 | (cd gcctestdir && $(LN_S) ../../ld-new ld) | |
129 | ||
f0323c2f | 130 | debug_msg.o: debug_msg.cc |
d12348b8 | 131 | $(CXXCOMPILE) -O0 -g -c -w -o $@ $(srcdir)/debug_msg.cc |
a55ce7fe ILT |
132 | odr_violation1.o: odr_violation1.cc |
133 | $(CXXCOMPILE) -O0 -g -c -w -o $@ $(srcdir)/odr_violation1.cc | |
134 | odr_violation2.o: odr_violation2.cc | |
135 | $(CXXCOMPILE) -O0 -g -c -w -o $@ $(srcdir)/odr_violation2.cc | |
e2827e5f ILT |
136 | debug_msg.err: debug_msg.o odr_violation1.o odr_violation2.o gcctestdir/ld |
137 | @echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o "2>$@" | |
138 | @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o 2>$@; \ | |
f0323c2f | 139 | then \ |
79e052ea | 140 | echo 1>&2 "Link of debug_msg should have failed"; \ |
eb01e199 | 141 | rm -f $@; \ |
f0323c2f ILT |
142 | exit 1; \ |
143 | fi | |
144 | ||
79e052ea ILT |
145 | # See if we can also detect problems when we're linking .so's, not .o's. |
146 | debug_msg.so: debug_msg.cc | |
763277c3 | 147 | $(CXXCOMPILE) -O0 -g -shared -fPIC -w -o $@ $(srcdir)/debug_msg.cc |
79e052ea | 148 | odr_violation1.so: odr_violation1.cc |
c92003e0 | 149 | $(CXXCOMPILE) -O0 -g -shared -fPIC -w -o $@ $(srcdir)/odr_violation1.cc |
79e052ea | 150 | odr_violation2.so: odr_violation2.cc |
c92003e0 | 151 | $(CXXCOMPILE) -O0 -g -shared -fPIC -w -o $@ $(srcdir)/odr_violation2.cc |
79e052ea ILT |
152 | debug_msg_so.err: debug_msg.so odr_violation1.so odr_violation2.so gcctestdir/ld |
153 | @echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_so debug_msg.so odr_violation1.so odr_violation2.so "2>$@" | |
154 | @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_so debug_msg.so odr_violation1.so odr_violation2.so 2>$@; \ | |
155 | then \ | |
156 | echo 1>&2 "Link of debug_msg_so should have failed"; \ | |
157 | rm -f $@; \ | |
158 | exit 1; \ | |
159 | fi | |
160 | ||
79e052ea ILT |
161 | # We also want to make sure we do something reasonable when there's no |
162 | # debug info available. For the best test, we use .so's. | |
163 | debug_msg_ndebug.so: debug_msg.cc | |
be00d4e7 | 164 | $(CXXCOMPILE) -O0 -g0 -shared -fPIC -w -o $@ $(srcdir)/debug_msg.cc |
79e052ea | 165 | odr_violation1_ndebug.so: odr_violation1.cc |
be00d4e7 | 166 | $(CXXCOMPILE) -O0 -g0 -shared -fPIC -w -o $@ $(srcdir)/odr_violation1.cc |
79e052ea | 167 | odr_violation2_ndebug.so: odr_violation2.cc |
be00d4e7 | 168 | $(CXXCOMPILE) -O0 -g0 -shared -fPIC -w -o $@ $(srcdir)/odr_violation2.cc |
79e052ea ILT |
169 | debug_msg_ndebug.err: debug_msg_ndebug.so odr_violation1_ndebug.so odr_violation2_ndebug.so gcctestdir/ld |
170 | @echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_ndebug debug_msg_ndebug.so odr_violation1_ndebug.so odr_violation2_ndebug.so "2>$@" | |
171 | @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_ndebug debug_msg_ndebug.so odr_violation1_ndebug.so odr_violation2_ndebug.so 2>$@; \ | |
172 | then \ | |
173 | echo 1>&2 "Link of debug_msg_ndebug should have failed"; \ | |
174 | rm -f $@; \ | |
175 | exit 1; \ | |
176 | fi | |
177 | ||
e2827e5f ILT |
178 | undef_symbol.o: undef_symbol.cc |
179 | $(CXXCOMPILE) -O0 -g -c -fPIC $< | |
7bf1f802 ILT |
180 | undef_symbol.so: undef_symbol.o gcctestdir/ld |
181 | $(CXXLINK) -Bgcctestdir/ -shared undef_symbol.o | |
e2827e5f ILT |
182 | undef_symbol.err: undef_symbol_main.o undef_symbol.so gcctestdir/ld |
183 | @echo $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so "2>$@" | |
184 | @if $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so 2>$@; \ | |
185 | then \ | |
186 | echo 1>&2 "Link of undef_symbol_test should have failed"; \ | |
eb01e199 | 187 | rm -f $@; \ |
e2827e5f ILT |
188 | exit 1; \ |
189 | fi | |
22dc1b09 | 190 | |
43771f76 ILT |
191 | # Test various flags. The actual file we choose to link is pretty |
192 | # much arbitrary: we just want to make sure we can link it and run it | |
193 | # successfully, even when using flags. | |
194 | ||
195 | flagstest_debug.o: constructor_test.cc | |
196 | $(CXXCOMPILE) -O0 -g -c -o $@ $< | |
197 | flagstest_ndebug.o: constructor_test.cc | |
198 | $(CXXCOMPILE) -O0 -c -o $@ $< | |
199 | ||
200 | flagstest_compress_debug_sections: flagstest_debug.o | |
201 | $(CXXLINK) -Bgcctestdir/ -o $@ $< --compress-debug-sections=zlib | |
202 | test -s $@ | |
203 | ||
204 | flagstest_o_specialfile: flagstest_debug.o | |
205 | $(CXXLINK) -Bgcctestdir/ -o /dev/stdout $< 2>&1 | cat > $@ | |
206 | chmod a+x $@ | |
207 | test -s $@ | |
208 | ||
209 | # The specialfile output has a tricky case when we also compress debug | |
210 | # sections, because it requires output-file resizing. | |
211 | flagstest_o_specialfile_and_compress_debug_sections: flagstest_debug.o | |
212 | $(CXXLINK) -Bgcctestdir/ -o /dev/stdout $< --compress-debug-sections=zlib 2>&1 | cat > $@ | |
213 | chmod a+x $@ | |
214 | test -s $@ | |
215 | ||
216 | ||
22dc1b09 | 217 | # Override the default CXXFLAGS--we don't want any optimization |
56ba9a23 | 218 | basic_test.o: basic_test.cc |
22dc1b09 | 219 | $(CXXCOMPILE) -O0 -c -o $@ $< |
56ba9a23 ILT |
220 | basic_test: basic_test.o gcctestdir/ld |
221 | $(CXXLINK) -Bgcctestdir/ basic_test.o | |
222 | basic_static_test: basic_test.o gcctestdir/ld | |
223 | $(CXXLINK) -Bgcctestdir/ -static basic_test.o | |
22dc1b09 | 224 | |
56ba9a23 | 225 | basic_pic_test.o: basic_test.cc |
22dc1b09 | 226 | $(CXXCOMPILE) -O0 -c -fpic -o $@ $< |
56ba9a23 ILT |
227 | basic_pic_test: basic_pic_test.o gcctestdir/ld |
228 | $(CXXLINK) -Bgcctestdir/ basic_pic_test.o | |
229 | basic_static_pic_test: basic_pic_test.o gcctestdir/ld | |
230 | $(CXXLINK) -Bgcctestdir/ -static basic_pic_test.o | |
22dc1b09 | 231 | |
d5026652 ILT |
232 | constructor_test_SOURCES = constructor_test.cc |
233 | constructor_test_DEPENDENCIES = gcctestdir/ld | |
234 | constructor_test_LDFLAGS = -Bgcctestdir/ | |
235 | ||
cb615bc1 ILT |
236 | constructor_static_test_SOURCES = constructor_test.cc |
237 | constructor_static_test_DEPENDENCIES = gcctestdir/ld | |
238 | constructor_static_test_LDFLAGS = -Bgcctestdir/ -static | |
239 | ||
3bd52c28 ILT |
240 | two_file_test_SOURCES = \ |
241 | two_file_test_1.cc \ | |
242 | two_file_test_2.cc \ | |
243 | two_file_test_main.cc \ | |
244 | two_file_test.h | |
245 | two_file_test_DEPENDENCIES = gcctestdir/ld | |
246 | two_file_test_LDFLAGS = -Bgcctestdir/ | |
247 | ||
f958d5fc ILT |
248 | two_file_static_test_SOURCES = \ |
249 | two_file_test_1.cc two_file_test_2.cc two_file_test_main.cc | |
250 | two_file_static_test_DEPENDENCIES = gcctestdir/ld | |
251 | two_file_static_test_LDFLAGS = -Bgcctestdir/ -static | |
252 | ||
253 | two_file_pic_test_SOURCES = two_file_test_main.cc | |
254 | two_file_pic_test_DEPENDENCIES = \ | |
255 | gcctestdir/ld two_file_test_1_pic.o two_file_test_2_pic.o | |
256 | two_file_pic_test_LDFLAGS = -Bgcctestdir/ | |
257 | two_file_pic_test_LDADD = two_file_test_1_pic.o two_file_test_2_pic.o | |
258 | ||
3bd52c28 ILT |
259 | two_file_shared_1_test_SOURCES = two_file_test_2.cc two_file_test_main.cc |
260 | two_file_shared_1_test_DEPENDENCIES = gcctestdir/ld two_file_shared_1.so | |
261 | two_file_shared_1_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
262 | two_file_shared_1_test_LDADD = two_file_shared_1.so | |
263 | ||
264 | two_file_shared_2_test_SOURCES = two_file_test_1.cc two_file_test_main.cc | |
265 | two_file_shared_2_test_DEPENDENCIES = gcctestdir/ld two_file_shared_2.so | |
266 | two_file_shared_2_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
267 | two_file_shared_2_test_LDADD = two_file_shared_2.so | |
268 | ||
386c048c ILT |
269 | two_file_shared_1_pic_2_test_SOURCES = two_file_test_main.cc |
270 | two_file_shared_1_pic_2_test_DEPENDENCIES = \ | |
271 | gcctestdir/ld two_file_shared_1.so two_file_test_1_pic.o | |
272 | two_file_shared_1_pic_2_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
273 | two_file_shared_1_pic_2_test_LDADD = two_file_test_1_pic.o two_file_shared_2.so | |
274 | ||
275 | two_file_shared_2_pic_1_test_SOURCES = two_file_test_main.cc | |
276 | two_file_shared_2_pic_1_test_DEPENDENCIES = \ | |
277 | gcctestdir/ld two_file_shared_2.so two_file_test_2_pic.o | |
278 | two_file_shared_2_pic_1_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
279 | two_file_shared_2_pic_1_test_LDADD = two_file_test_2_pic.o two_file_shared_1.so | |
280 | ||
3bd52c28 ILT |
281 | two_file_same_shared_test_SOURCES = two_file_test_main.cc |
282 | two_file_same_shared_test_DEPENDENCIES = gcctestdir/ld two_file_shared.so | |
283 | two_file_same_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
284 | two_file_same_shared_test_LDADD = two_file_shared.so | |
285 | ||
286 | two_file_separate_shared_12_test_SOURCES = two_file_test_main.cc | |
287 | two_file_separate_shared_12_test_DEPENDENCIES = \ | |
288 | gcctestdir/ld two_file_shared_1.so two_file_shared_2.so | |
289 | two_file_separate_shared_12_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
290 | two_file_separate_shared_12_test_LDADD = \ | |
291 | two_file_shared_1.so two_file_shared_2.so | |
292 | ||
293 | two_file_separate_shared_21_test_SOURCES = two_file_test_main.cc | |
294 | two_file_separate_shared_21_test_DEPENDENCIES = \ | |
295 | gcctestdir/ld two_file_shared_1.so two_file_shared_2.so | |
296 | two_file_separate_shared_21_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
297 | two_file_separate_shared_21_test_LDADD = \ | |
298 | two_file_shared_2.so two_file_shared_1.so | |
299 | ||
63402fe4 ILT |
300 | two_file_test_1_pic.o: two_file_test_1.cc |
301 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
302 | two_file_test_2_pic.o: two_file_test_2.cc | |
303 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
304 | ||
7bf1f802 ILT |
305 | two_file_shared_1.so: two_file_test_1_pic.o gcctestdir/ld |
306 | $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o | |
307 | two_file_shared_2.so: two_file_test_2_pic.o gcctestdir/ld | |
308 | $(CXXLINK) -Bgcctestdir/ -shared two_file_test_2_pic.o | |
309 | two_file_shared.so: two_file_test_1_pic.o two_file_test_2_pic.o gcctestdir/ld | |
310 | $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_2_pic.o | |
63402fe4 ILT |
311 | |
312 | # The nonpic tests will fail on platforms which can not put non-PIC | |
313 | # code into shared libraries, so we just don't run them in that case. | |
314 | ||
315 | if FN_PTRS_IN_SO_WITHOUT_PIC | |
3bd52c28 ILT |
316 | |
317 | two_file_shared_1_nonpic_test_SOURCES = \ | |
318 | two_file_test_2.cc two_file_test_main.cc | |
319 | two_file_shared_1_nonpic_test_DEPENDENCIES = \ | |
320 | gcctestdir/ld two_file_shared_1_nonpic.so | |
321 | two_file_shared_1_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
322 | two_file_shared_1_nonpic_test_LDADD = two_file_shared_1_nonpic.so | |
323 | ||
324 | two_file_shared_2_nonpic_test_SOURCES = \ | |
325 | two_file_test_1.cc two_file_test_main.cc | |
326 | two_file_shared_2_nonpic_test_DEPENDENCIES = \ | |
327 | gcctestdir/ld two_file_shared_2_nonpic.so | |
328 | two_file_shared_2_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
329 | two_file_shared_2_nonpic_test_LDADD = two_file_shared_2_nonpic.so | |
330 | ||
331 | two_file_same_shared_nonpic_test_SOURCES = two_file_test_main.cc | |
332 | two_file_same_shared_nonpic_test_DEPENDENCIES = \ | |
333 | gcctestdir/ld two_file_shared_nonpic.so | |
334 | two_file_same_shared_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
335 | two_file_same_shared_nonpic_test_LDADD = two_file_shared_nonpic.so | |
336 | ||
337 | two_file_separate_shared_12_nonpic_test_SOURCES = two_file_test_main.cc | |
338 | two_file_separate_shared_12_nonpic_test_DEPENDENCIES = \ | |
339 | gcctestdir/ld two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so | |
340 | two_file_separate_shared_12_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
341 | two_file_separate_shared_12_nonpic_test_LDADD = \ | |
342 | two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so | |
343 | ||
344 | two_file_separate_shared_21_nonpic_test_SOURCES = two_file_test_main.cc | |
345 | two_file_separate_shared_21_nonpic_test_DEPENDENCIES = \ | |
346 | gcctestdir/ld two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so | |
347 | two_file_separate_shared_21_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
348 | two_file_separate_shared_21_nonpic_test_LDADD = \ | |
349 | two_file_shared_2_nonpic.so two_file_shared_1_nonpic.so | |
350 | ||
7bf1f802 ILT |
351 | two_file_shared_1_nonpic.so: two_file_test_1.o gcctestdir/ld |
352 | $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o | |
353 | two_file_shared_2_nonpic.so: two_file_test_2.o gcctestdir/ld | |
354 | $(CXXLINK) -Bgcctestdir/ -shared two_file_test_2.o | |
355 | two_file_shared_nonpic.so: two_file_test_1.o two_file_test_2.o gcctestdir/ld | |
356 | $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_2.o | |
3bd52c28 | 357 | |
63402fe4 ILT |
358 | endif |
359 | ||
3151305a ILT |
360 | exception_test_SOURCES = \ |
361 | exception_test_main.cc \ | |
362 | exception_test_1.cc \ | |
363 | exception_test_2.cc \ | |
364 | exception_test.h | |
365 | exception_test_DEPENDENCIES = gcctestdir/ld | |
366 | exception_test_LDFLAGS = -Bgcctestdir/ | |
367 | ||
368 | exception_static_test_SOURCES = \ | |
369 | exception_test_main.cc \ | |
370 | exception_test_1.cc \ | |
371 | exception_test_2.cc | |
372 | exception_static_test_DEPENDENCIES = gcctestdir/ld | |
373 | exception_static_test_LDFLAGS = -Bgcctestdir/ -static | |
374 | ||
375 | exception_shared_1_test_SOURCES = exception_test_2.cc exception_test_main.cc | |
376 | exception_shared_1_test_DEPENDENCIES = gcctestdir/ld exception_shared_1.so | |
377 | exception_shared_1_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
378 | exception_shared_1_test_LDADD = exception_shared_1.so | |
379 | ||
380 | exception_shared_2_test_SOURCES = exception_test_1.cc exception_test_main.cc | |
381 | exception_shared_2_test_DEPENDENCIES = gcctestdir/ld exception_shared_2.so | |
382 | exception_shared_2_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
383 | exception_shared_2_test_LDADD = exception_shared_2.so | |
384 | ||
385 | exception_same_shared_test_SOURCES = exception_test_main.cc | |
386 | exception_same_shared_test_DEPENDENCIES = gcctestdir/ld exception_shared.so | |
387 | exception_same_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
388 | exception_same_shared_test_LDADD = exception_shared.so | |
389 | ||
390 | exception_separate_shared_12_test_SOURCES = exception_test_main.cc | |
391 | exception_separate_shared_12_test_DEPENDENCIES = \ | |
392 | gcctestdir/ld exception_shared_1.so exception_shared_2.so | |
393 | exception_separate_shared_12_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
394 | exception_separate_shared_12_test_LDADD = \ | |
395 | exception_shared_1.so exception_shared_2.so | |
396 | ||
397 | exception_separate_shared_21_test_SOURCES = exception_test_main.cc | |
398 | exception_separate_shared_21_test_DEPENDENCIES = \ | |
399 | gcctestdir/ld exception_shared_1.so exception_shared_2.so | |
400 | exception_separate_shared_21_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
401 | exception_separate_shared_21_test_LDADD = \ | |
402 | exception_shared_2.so exception_shared_1.so | |
403 | ||
404 | exception_test_1_pic.o: exception_test_1.cc | |
405 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
406 | exception_test_2_pic.o: exception_test_2.cc | |
407 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
408 | ||
7bf1f802 ILT |
409 | exception_shared_1.so: exception_test_1_pic.o gcctestdir/ld |
410 | $(CXXLINK) -Bgcctestdir/ -shared exception_test_1_pic.o | |
411 | exception_shared_2.so: exception_test_2_pic.o gcctestdir/ld | |
412 | $(CXXLINK) -Bgcctestdir/ -shared exception_test_2_pic.o | |
413 | exception_shared.so: exception_test_1_pic.o exception_test_2_pic.o gcctestdir/ld | |
414 | $(CXXLINK) -Bgcctestdir/ -shared exception_test_1_pic.o exception_test_2_pic.o | |
3151305a | 415 | |
a360aedd ILT |
416 | weak_test_SOURCES = weak_test.cc |
417 | weak_test_LDFLAGS = -Bgcctestdir/ | |
418 | ||
6eee141f ILT |
419 | if TLS |
420 | ||
e0374858 | 421 | tls_test_SOURCES = tls_test.cc tls_test_file2.cc tls_test_main.cc tls_test.h |
6eee141f ILT |
422 | tls_test_DEPENDENCIES = gcctestdir/ld |
423 | tls_test_LDFLAGS = -Bgcctestdir/ | |
424 | tls_test_LDADD = -lpthread | |
425 | ||
426 | tls_pic_test_SOURCES = tls_test_main.cc | |
e0374858 | 427 | tls_pic_test_DEPENDENCIES = gcctestdir/ld tls_test_pic.o tls_test_file2_pic.o |
6eee141f | 428 | tls_pic_test_LDFLAGS = -Bgcctestdir/ |
e0374858 | 429 | tls_pic_test_LDADD = tls_test_pic.o tls_test_file2_pic.o -lpthread |
6eee141f | 430 | |
e0374858 | 431 | tls_static_test_SOURCES = tls_test.cc tls_test_file2.cc tls_test_main.cc |
6eee141f ILT |
432 | tls_static_test_DEPENDENCIES = gcctestdir/ld |
433 | tls_static_test_LDFLAGS = -Bgcctestdir/ -static | |
434 | tls_static_test_LDADD = -lpthread | |
435 | ||
436 | tls_static_pic_test_SOURCES = tls_test_main.cc | |
e0374858 | 437 | tls_static_pic_test_DEPENDENCIES = gcctestdir/ld tls_test_pic.o tls_test_file2_pic.o |
6eee141f | 438 | tls_static_pic_test_LDFLAGS = -Bgcctestdir/ -static |
e0374858 | 439 | tls_static_pic_test_LDADD = tls_test_pic.o tls_test_file2_pic.o -lpthread |
6eee141f ILT |
440 | |
441 | tls_shared_test_SOURCES = tls_test_main.cc | |
442 | tls_shared_test_DEPENDENCIES = gcctestdir/ld tls_test_shared.so | |
443 | tls_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
444 | tls_shared_test_LDADD = tls_test_shared.so -lpthread | |
445 | ||
446 | tls_test_pic.o: tls_test.cc | |
447 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
448 | ||
e0374858 ILT |
449 | tls_test_file2_pic.o: tls_test_file2.cc |
450 | $(CXXCOMPILE) -c -fpic -o $@ $< | |
451 | ||
7bf1f802 ILT |
452 | tls_test_shared.so: tls_test_pic.o tls_test_file2_pic.o gcctestdir/ld |
453 | $(CXXLINK) -Bgcctestdir/ -shared tls_test_pic.o tls_test_file2_pic.o | |
6eee141f ILT |
454 | |
455 | if FN_PTRS_IN_SO_WITHOUT_PIC | |
456 | ||
457 | tls_shared_nonpic_test_SOURCES = tls_test_main.cc | |
458 | tls_shared_nonpic_test_DEPENDENCIES = gcctestdir/ld tls_test_shared_nonpic.so | |
459 | tls_shared_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. | |
460 | tls_shared_nonpic_test_LDADD = tls_test_shared_nonpic.so -lpthread | |
461 | ||
7bf1f802 ILT |
462 | tls_test_shared_nonpic.so: tls_test.o tls_test_file2.o gcctestdir/ld |
463 | $(CXXLINK) -Bgcctestdir/ -shared tls_test.o tls_test_file2.o | |
6eee141f ILT |
464 | |
465 | endif | |
466 | ||
467 | endif | |
468 | ||
22dc1b09 ILT |
469 | endif |
470 | endif |