coregrind/m_gdbserver/remote-utils.c (prepare_resume_reply): Use memcpy
[valgrind.git] / drd / tests / Makefile.am
blobe2030ad157df314382ef835354364a455b4b9634
2 include $(top_srcdir)/Makefile.tool-tests.am
4 dist_noinst_SCRIPTS =               \
5         compare_error_count_with    \
6         filter_annotate_barrier_xml \
7         filter_lambda               \
8         filter_stderr_and_thread_no \
9         filter_stderr_solaris       \
10         filter_thread_name_xml      \
11         run_openmp_test             \
12         supported_libpthread        \
13         supported_sem_init
15 noinst_SCRIPTS = \
16         filter_error_count \
17         filter_error_summary \
18         filter_stderr \
19         filter_stderr_and_thread_no_and_offset \
20         filter_thread_no \
21         filter_xml_and_thread_no
23 noinst_HEADERS =                                    \
24         tsan_thread_wrappers_pthread.h              \
25         unified_annotations.h                       \
26         dlopen_lib.h
28 EXTRA_DIST =                                        \
29         annotate_barrier.stderr.exp                 \
30         annotate_barrier.vgtest                     \
31         annotate_barrier_xml.stderr.exp             \
32         annotate_barrier_xml.vgtest                 \
33         annotate_hb_err.stderr.exp                  \
34         annotate_hb_err.vgtest                      \
35         annotate_hb_race.stderr.exp                 \
36         annotate_hb_race.vgtest                     \
37         annotate_hbefore.stderr.exp                 \
38         annotate_hbefore.vgtest                     \
39         annotate_order_1.stderr.exp                 \
40         annotate_order_1.vgtest                     \
41         annotate_order_2.stderr.exp                 \
42         annotate_order_2.vgtest                     \
43         annotate_order_3.stderr.exp                 \
44         annotate_order_3.vgtest                     \
45         annotate_publish_hg.stderr.exp              \
46         annotate_publish_hg.vgtest                  \
47         annotate_sem.stderr.exp                     \
48         annotate_sem.vgtest                         \
49         annotate_smart_pointer.stderr.exp           \
50         annotate_smart_pointer.vgtest               \
51         annotate_smart_pointer2.stderr.exp          \
52         annotate_smart_pointer2.stderr.exp-darwin   \
53         annotate_smart_pointer2.vgtest              \
54         annotate_spinlock.stderr.exp                \
55         annotate_spinlock.vgtest                    \
56         annotate_rwlock.stderr.exp                  \
57         annotate_rwlock.vgtest                      \
58         annotate_rwlock_hg.stderr.exp               \
59         annotate_rwlock_hg.vgtest                   \
60         annotate_ignore_read.stderr.exp             \
61         annotate_ignore_read.vgtest                 \
62         annotate_ignore_rw.stderr.exp               \
63         annotate_ignore_rw.vgtest                   \
64         annotate_ignore_rw2.stderr.exp              \
65         annotate_ignore_rw2.stderr.exp-solaris      \
66         annotate_ignore_rw2.vgtest                  \
67         annotate_ignore_write.stderr.exp            \
68         annotate_ignore_write.stderr.exp-solaris    \
69         annotate_ignore_write.vgtest                \
70         annotate_ignore_write2.stderr.exp           \
71         annotate_ignore_write2.stderr.exp-solaris   \
72         annotate_ignore_write2.vgtest               \
73         annotate_trace_memory.stderr.exp-arm        \
74         annotate_trace_memory.stderr.exp-32bit      \
75         annotate_trace_memory.stderr.exp-32bit-clang \
76         annotate_trace_memory.stderr.exp-64bit      \
77         annotate_trace_memory.stderr.exp-mips32     \
78         annotate_trace_memory.vgtest                \
79         annotate_trace_memory_xml.stderr.exp-arm    \
80         annotate_trace_memory_xml.stderr.exp-32bit  \
81         annotate_trace_memory_xml.stderr.exp-32bit-clang \
82         annotate_trace_memory_xml.stderr.exp-64bit  \
83         annotate_trace_memory_xml.stderr.exp-mips32 \
84         annotate_trace_memory_xml.vgtest            \
85         annotate_sem.stderr.exp                     \
86         annotate_sem.vgtest                         \
87         annotate_static.stderr.exp                  \
88         annotate_static.vgtest                      \
89         atomic_var.stderr.exp                       \
90         atomic_var.vgtest                           \
91         bug322621.vgtest                            \
92         bug322621.stderr.exp                        \
93         bar_bad.stderr.exp                          \
94         bar_bad.stderr.exp-no-barrier               \
95         bar_bad.stderr.exp-nohang                   \
96         bar_bad.stderr.exp-solaris                  \
97         bar_bad.stderr.exp-freebsd                  \
98         bar_bad.vgtest                              \
99         bar_bad_xml.stderr.exp                      \
100         bar_bad_xml.stderr.exp-no-barrier           \
101         bar_bad_xml.stderr.exp-nohang               \
102         bar_bad_xml.stderr.exp-solaris              \
103         bar_bad_xml.stderr.exp-freebsd              \
104         bar_bad_xml.vgtest                          \
105         bar_trivial.stderr.exp                      \
106         bar_trivial.stdout.exp                      \
107         bar_trivial.vgtest                          \
108         boost_thread.stderr.exp                     \
109         boost_thread.vgtest                         \
110         bug-235681.stderr.exp                       \
111         bug-235681.vgtest                           \
112         circular_buffer.stderr.exp                  \
113         circular_buffer.vgtest                      \
114         concurrent_close.stderr.exp                 \
115         concurrent_close.vgtest                     \
116         condvar.stderr.exp                          \
117         condvar.vgtest                              \
118         custom_alloc.stderr.exp                     \
119         custom_alloc.vgtest                         \
120         custom_alloc_fiw.stderr.exp                 \
121         custom_alloc_fiw.vgtest                     \
122         dlopen.stderr.exp                           \
123         dlopen.stdout.exp                           \
124         dlopen.vgtest                               \
125         fork-serial.stderr.exp                      \
126         fork-serial.vgtest                          \
127         fork-parallel.stderr.exp                    \
128         fork-parallel.vgtest                        \
129         fp_race.stderr.exp                          \
130         fp_race.stderr.exp-mips32-be                \
131         fp_race.stderr.exp-mips32-le                \
132         fp_race.vgtest                              \
133         fp_race2.stderr.exp                         \
134         fp_race2.vgtest                             \
135         fp_race_xml.stderr.exp                      \
136         fp_race_xml.stderr.exp-mips32-be            \
137         fp_race_xml.stderr.exp-mips32-le            \
138         fp_race_xml.stderr.exp-solaris              \
139         fp_race_xml.vgtest                          \
140         free_is_write.stderr.exp                    \
141         free_is_write.vgtest                        \
142         free_is_write2.stderr.exp                   \
143         free_is_write2.vgtest                       \
144         hg01_all_ok.stderr.exp                      \
145         hg01_all_ok.vgtest                          \
146         hg02_deadlock.stderr.exp                    \
147         hg02_deadlock.vgtest                        \
148         hg03_inherit.stderr.exp                     \
149         hg03_inherit.vgtest                         \
150         hg04_race.stderr.exp                        \
151         hg04_race.vgtest                            \
152         hg05_race2.stderr.exp                       \
153         hg05_race2.stderr.exp-powerpc               \
154         hg05_race2.vgtest                           \
155         hg06_readshared.stderr.exp                  \
156         hg06_readshared.vgtest                      \
157         hold_lock_1.stderr.exp                      \
158         hold_lock_1.vgtest                          \
159         hold_lock_2.stderr.exp                      \
160         hold_lock_2.vgtest                          \
161         getaddrinfo.stderr.exp                      \
162         getaddrinfo.vgtest                          \
163         linuxthreads_det.stderr.exp                 \
164         linuxthreads_det.stderr.exp-linuxthreads    \
165         linuxthreads_det.stdout.exp                 \
166         linuxthreads_det.stdout.exp-linuxthreads    \
167         linuxthreads_det.vgtest                     \
168         local_static.stderr.exp                     \
169         local_static.vgtest                         \
170         matinv.stderr.exp                           \
171         matinv.stdout.exp                           \
172         matinv.vgtest                               \
173         memory_allocation.stderr.exp                \
174         memory_allocation.vgtest                    \
175         monitor_example.stderr.exp                  \
176         monitor_example.vgtest                      \
177         new_delete.stderr.exp                       \
178         new_delete.vgtest                           \
179         omp_matinv.stderr.exp                       \
180         omp_matinv.stdout.exp                       \
181         omp_matinv.vgtest                           \
182         omp_matinv_racy.stderr.exp                  \
183         omp_matinv_racy.stdout.exp                  \
184         omp_matinv_racy.vgtest                      \
185         omp_prime_racy.stderr.exp                   \
186         omp_prime_racy.vgtest                       \
187         omp_printf.stderr.exp                       \
188         omp_printf.vgtest                           \
189         pth_barrier.stderr.exp                      \
190         pth_barrier.vgtest                          \
191         pth_barrier2.stderr.exp                     \
192         pth_barrier2.vgtest                         \
193         pth_barrier3.stderr.exp                     \
194         pth_barrier3.vgtest                         \
195         pth_barrier_race.stderr.exp                 \
196         pth_barrier_race.vgtest                     \
197         pth_barrier_reinit.stderr.exp               \
198         pth_barrier_reinit.vgtest                   \
199         pth_barrier_thr_cr.stderr.exp               \
200         pth_barrier_thr_cr.vgtest                   \
201         pth_barrier_thr_cr.supp                     \
202         pth_broadcast.stderr.exp                    \
203         pth_broadcast.vgtest                        \
204         pth_cancel_locked.stderr.exp                \
205         pth_cancel_locked.stderr.exp-darwin         \
206         pth_cancel_locked.vgtest                    \
207         pth_cleanup_handler.stderr.exp              \
208         pth_cleanup_handler.vgtest                  \
209         pth_cond_destroy_busy.stderr.exp            \
210         pth_cond_destroy_busy.stderr.exp-solaris    \
211         pth_cond_destroy_busy.vgtest                \
212         pth_cond_race.stderr.exp                    \
213         pth_cond_race.vgtest                        \
214         pth_cond_race2.stderr.exp                   \
215         pth_cond_race2.vgtest                       \
216         pth_cond_race3.stderr.exp                   \
217         pth_cond_race3.vgtest                       \
218         pth_create_chain.stderr.exp                 \
219         pth_create_chain.vgtest                     \
220         pth_create_glibc_2_0.stderr.exp             \
221         pth_create_glibc_2_0.vgtest                 \
222         pth_detached.stderr.exp                     \
223         pth_detached.stdout.exp                     \
224         pth_detached.vgtest                         \
225         pth_detached2.stderr.exp                    \
226         pth_detached2.stdout.exp                    \
227         pth_detached2.vgtest                        \
228         pth_detached3.stderr.exp1                   \
229         pth_detached3.stderr.exp2                   \
230         pth_detached3.stderr.exp-freebsd            \
231         pth_detached3.vgtest                        \
232         pth_detached_sem.stderr.exp                 \
233         pth_detached_sem.stdout.exp                 \
234         pth_detached_sem.vgtest                     \
235         pth_inconsistent_cond_wait.stderr.exp1      \
236         pth_inconsistent_cond_wait.stderr.exp2      \
237         pth_inconsistent_cond_wait.vgtest           \
238         pth_mutex_reinit.stderr.exp                 \
239         pth_mutex_reinit.vgtest                     \
240         pth_mutex_signal.stderr.exp                 \
241         pth_mutex_signal.vgtest                     \
242         pth_once.stderr.exp                         \
243         pth_once.vgtest                             \
244         pth_process_shared_mutex.stderr.exp         \
245         pth_process_shared_mutex.vgtest             \
246         pth_spinlock.stderr.exp                     \
247         pth_spinlock.vgtest                         \
248         pth_uninitialized_cond.stderr.exp           \
249         pth_uninitialized_cond.vgtest               \
250         read_and_free_race.stderr.exp               \
251         read_and_free_race.vgtest                   \
252         recursive_mutex.stderr.exp-linux            \
253         recursive_mutex.stderr.exp-darwin           \
254         recursive_mutex.stderr.exp-solaris          \
255         recursive_mutex.stderr.exp-freebsd          \
256         recursive_mutex.vgtest                      \
257         rwlock_race.stderr.exp                      \
258         rwlock_race.stderr.exp2                     \
259         rwlock_race.vgtest                          \
260         rwlock_test.stderr.exp                      \
261         rwlock_test.vgtest                          \
262         rwlock_type_checking.stderr.exp             \
263         rwlock_type_checking.vgtest                 \
264         sem_as_mutex.stderr.exp                     \
265         sem_as_mutex.stderr.exp-mips32-be           \
266         sem_as_mutex.stderr.exp-mips32-le           \
267         sem_as_mutex.vgtest                         \
268         sem_as_mutex2.stderr.exp                    \
269         sem_as_mutex2.vgtest                        \
270         sem_as_mutex3.stderr.exp                    \
271         sem_as_mutex3.stderr.exp-mips32-be          \
272         sem_as_mutex3.stderr.exp-mips32-le          \
273         sem_as_mutex3.vgtest                        \
274         sem_clockwait_np.stderr.exp                 \
275         sem_clockwait_np.stdout.exp                 \
276         sem_clockwait_np.vgtest                     \
277         sem_open.stderr.exp                         \
278         sem_open.stderr.exp-mips32-be               \
279         sem_open.stderr.exp-mips32-le               \
280         sem_open.vgtest                             \
281         sem_open2.stderr.exp                        \
282         sem_open2.vgtest                            \
283         sem_open3.stderr.exp                        \
284         sem_open3.stderr.exp-mips32-be              \
285         sem_open3.stderr.exp-mips32-le              \
286         sem_open3.vgtest                            \
287         sem_open_traced.stderr.exp                  \
288         sem_open_traced.vgtest                      \
289         sem_wait.stderr.exp                         \
290         sem_wait.vgtest                             \
291         shared_timed_mutex.stderr.exp               \
292         shared_timed_mutex.vgtest                   \
293         swapcontext.stderr.exp                      \
294         swapcontext.vgtest                          \
295         sigalrm.stderr.exp                          \
296         sigalrm.vgtest                              \
297         sigaltstack.stderr.exp                      \
298         sigaltstack.vgtest                          \
299         std_atomic.stderr.exp                       \
300         std_atomic.vgtest                           \
301         std_list.stderr.exp                         \
302         std_list.vgtest                             \
303         std_mutex.stderr.exp                        \
304         std_mutex.vgtest                            \
305         std_string.stderr.exp                       \
306         std_string.vgtest                           \
307         std_thread.stderr.exp                       \
308         std_thread.vgtest                           \
309         std_thread2.stderr.exp                      \
310         std_thread2.vgtest                          \
311         std_thread2.supp                            \
312         str_tester.stderr.exp                       \
313         str_tester.vgtest                           \
314         tc01_simple_race.stderr.exp                 \
315         tc01_simple_race.vgtest                     \
316         tc02_simple_tls.stderr.exp                  \
317         tc02_simple_tls.vgtest                      \
318         tc03_re_excl.stderr.exp                     \
319         tc03_re_excl.vgtest                         \
320         tc04_free_lock.stderr.exp-x86               \
321         tc04_free_lock.stderr.exp-ppc               \
322         tc04_free_lock.stderr.exp-s390              \
323         tc04_free_lock.vgtest                       \
324         tc05_simple_race.stderr.exp                 \
325         tc05_simple_race.vgtest                     \
326         tc06_two_races.stderr.exp                   \
327         tc06_two_races.vgtest                       \
328         tc07_hbl1.stderr.exp                        \
329         tc07_hbl1.stdout.exp                        \
330         tc07_hbl1.vgtest                            \
331         tc08_hbl2.stderr.exp                        \
332         tc08_hbl2.stdout.exp                        \
333         tc08_hbl2.vgtest                            \
334         tc09_bad_unlock.stderr.exp-x86              \
335         tc09_bad_unlock.stderr.exp-ppc              \
336         tc09_bad_unlock.stderr.exp-glibc2.8         \
337         tc09_bad_unlock.stderr.exp-s390             \
338         tc09_bad_unlock.stderr.exp-solaris          \
339         tc09_bad_unlock.stderr.exp-freebsd          \
340         tc09_bad_unlock.stderr.exp-freebsd-clang    \
341         tc09_bad_unlock.vgtest                      \
342         tc10_rec_lock.stderr.exp                    \
343         tc10_rec_lock.vgtest                        \
344         tc11_XCHG.stderr.exp tc11_XCHG.stdout.exp   \
345         tc11_XCHG.vgtest                            \
346         tc12_rwl_trivial.stderr.exp                 \
347         tc12_rwl_trivial.vgtest                     \
348         tc13_laog1.stderr.exp                       \
349         tc13_laog1.vgtest                           \
350         tc15_laog_lockdel.stderr.exp                \
351         tc15_laog_lockdel.vgtest                    \
352         tc16_byterace.stderr.exp                    \
353         tc16_byterace.vgtest                        \
354         tc17_sembar.stderr.exp                      \
355         tc17_sembar.vgtest                          \
356         tc18_semabuse.stderr.exp                    \
357         tc18_semabuse.stderr.exp-solaris            \
358         tc18_semabuse.vgtest                        \
359         tc19_shadowmem.stderr.exp-32bit             \
360         tc19_shadowmem.stderr.exp-32bit-BE          \
361         tc19_shadowmem.stderr.exp-32on64            \
362         tc19_shadowmem.stderr.exp-64bit             \
363         tc19_shadowmem.vgtest                       \
364         tc21_pthonce.stderr.exp                     \
365         tc21_pthonce.stdout.exp                     \
366         tc21_pthonce.vgtest                         \
367         tc22_exit_w_lock.stderr.exp-32bit           \
368         tc22_exit_w_lock.stderr.exp-64bit           \
369         tc22_exit_w_lock.vgtest                     \
370         tc23_bogus_condwait.stderr.exp-linux-x86    \
371         tc23_bogus_condwait.stderr.exp-linux-ppc    \
372         tc23_bogus_condwait.stderr.exp-darwin-x86   \
373         tc23_bogus_condwait.stderr.exp-darwin-amd64 \
374         tc23_bogus_condwait.stderr.exp-freebsd      \
375         tc23_bogus_condwait.vgtest                  \
376         tc24_nonzero_sem.stderr.exp                 \
377         tc24_nonzero_sem.vgtest                     \
378         thrd_create.stderr.exp                      \
379         thrd_create.vgtest                          \
380         thread_name.stderr.exp                      \
381         thread_name.vgtest                          \
382         thread_name_xml.stderr.exp                  \
383         thread_name_xml.vgtest                      \
384         thread_name_freebsd.stderr.exp              \
385         thread_name_freebsd.vgtest                  \
386         threaded-fork.stderr.exp                    \
387         threaded-fork.vgtest                        \
388         threaded-fork-vcs.stderr.exp                \
389         threaded-fork-vcs.vgtest                    \
390         timed_mutex.stderr.exp                      \
391         timed_mutex.vgtest                          \
392         tls_threads.stderr.exp                      \
393         tls_threads.vgtest                          \
394         trylock.stderr.exp                          \
395         trylock.vgtest                              \
396         unit_bitmap.stderr.exp                      \
397         unit_bitmap.vgtest                          \
398         unit_vc.stderr.exp                          \
399         unit_vc.vgtest
402 check_PROGRAMS =      \
403   annotate_hb_err     \
404   annotate_hb_race    \
405   annotate_ignore_rw  \
406   annotate_ignore_write \
407   annotate_publish_hg \
408   annotate_static     \
409   annotate_trace_memory \
410   bug-235681          \
411   custom_alloc        \
412   concurrent_close    \
413   dlopen_main         \
414   dlopen_lib.so       \
415   fork                \
416   fp_race             \
417   free_is_write       \
418   hold_lock           \
419   linuxthreads_det    \
420   local_static        \
421   memory_allocation   \
422   monitor_example     \
423   new_delete          \
424   pth_broadcast       \
425   pth_cancel_locked   \
426   pth_cleanup_handler \
427   pth_cond_destroy_busy \
428   pth_cond_race       \
429   pth_create_chain    \
430   pth_detached        \
431   pth_detached_sem    \
432   pth_detached3       \
433   pth_inconsistent_cond_wait \
434   pth_mutex_reinit    \
435   pth_mutex_signal    \
436   pth_process_shared_mutex   \
437   recursive_mutex     \
438   rwlock_race         \
439   rwlock_test         \
440   rwlock_type_checking \
441   sem_as_mutex        \
442   sem_open            \
443   sigalrm             \
444   threaded-fork       \
445   trylock             \
446   unit_bitmap         \
447   unit_vc             \
448   std_atomic          \
449   std_list            \
450   std_mutex           \
451   std_string
453 if HAVE_BOOST_1_35
454 check_PROGRAMS += boost_thread
455 endif
457 if HAVE_BUILTIN_ATOMIC
458 check_PROGRAMS +=        \
459   annotate_barrier       \
460   annotate_rwlock        \
461   annotate_sem           \
462   atomic_var             \
463   circular_buffer
464 endif
466 if HAVE_BUILTIN_ATOMIC_CXX
467 check_PROGRAMS +=        \
468   annotate_smart_pointer
469 endif
471 if !VGCONF_OS_IS_FREEBSD
472 check_PROGRAMS += tsan_unittest \
473   pth_uninitialized_cond
474 endif
476 # clang 3.3 will generate errors about libstdc++ headers from 
477 # gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
478 if CXX_CAN_INCLUDE_THREAD_HEADER
479 if HAVE_SHARED_POINTER_ANNOTATION
480 check_PROGRAMS += \
481   std_thread      \
482   std_thread2
483 endif
484 endif
486 if CXX_CAN_INCLUDE_CONDITION_VARIABLE_HEADER
487 check_PROGRAMS += \
488     condvar
489 endif
491 if CXX_CAN_USE_SHARED_TIMED_MUTEX
492 check_PROGRAMS += \
493     shared_timed_mutex
494 endif
496 if CXX_CAN_USE_TIMED_MUTEX
497 check_PROGRAMS += \
498     timed_mutex
499 endif
501 if HAVE_OPENMP
502 check_PROGRAMS += omp_matinv omp_prime omp_printf
503 endif
505 if HAVE_PTHREAD_BARRIER
506 check_PROGRAMS +=               \
507         bug322621               \
508         matinv                  \
509         pth_barrier             \
510         pth_barrier_race        \
511         pth_barrier_reinit      \
512         pth_barrier_thr_cr      \
513         thread_name
514 endif
516 if HAVE_PTHREAD_CREATE_GLIBC_2_0
517 check_PROGRAMS += pth_create_glibc_2_0
518 endif
520 if HAVE_PTHREAD_SPINLOCK
521 check_PROGRAMS += pth_spinlock
522 endif
524 if HAVE_SWAPCONTEXT
525 check_PROGRAMS += swapcontext
526 endif
528 if HAVE_THRD_CREATE
529 check_PROGRAMS += thrd_create
530 endif
532 if !VGCONF_OS_IS_DARWIN
533 check_PROGRAMS += sem_wait
534 endif
536 if VGCONF_OS_IS_FREEBSD
537 check_PROGRAMS += thread_name_freebsd
538 endif
541 AM_CFLAGS   += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
542 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ @FLAG_FALIGNED_NEW@ \
543         -Wno-inline -Wno-unused-parameter
545 LDADD = -lpthread
547 annotate_sem_CFLAGS         = $(AM_CFLAGS) @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@
548 annotate_rwlock_CFLAGS      = $(AM_CFLAGS) @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@
549 bug322621_SOURCES           = bug322621.cpp
550 condvar_SOURCES             = condvar.cpp
551 condvar_CXXFLAGS            = $(AM_CXXFLAGS) -std=c++0x
552 concurrent_close_SOURCES    = concurrent_close.cpp
553 if !VGCONF_OS_IS_FREEBSD
554 dlopen_main_LDADD           = -ldl
555 endif
556 dlopen_lib_so_SOURCES       = dlopen_lib.c
557 dlopen_lib_so_CFLAGS        = -fPIC
558 dlopen_lib_so_LDFLAGS       = -shared -fPIC
559 monitor_example_SOURCES     = monitor_example.cpp
560 new_delete_SOURCES          = new_delete.cpp
561 new_delete_CXXFLAGS         = $(AM_CXXFLAGS) @FLAG_W_NO_MISMATCHED_NEW_DELETE@
563 free_is_write_CFLAGS        = $(AM_CFLAGS)
564 pth_barrier_CFLAGS          = $(AM_CFLAGS)
565 if VGCONF_OS_IS_SOLARIS
566 free_is_write_CFLAGS        += -D__EXTENSIONS__
567 pth_barrier_CFLAGS          += -D__EXTENSIONS__
568 endif
570 pth_create_chain_CFLAGS     = $(AM_CFLAGS)
571 pth_detached_CFLAGS         = $(AM_CFLAGS)
572 if VGCONF_OS_IS_SOLARIS
573 pth_create_chain_CFLAGS     += -D__EXTENSIONS__
574 pth_detached_CFLAGS         += -D__EXTENSIONS__
575 endif
577 tsan_unittest_SOURCES       = tsan_unittest.cpp
578 tsan_unittest_CXXFLAGS      = $(AM_CXXFLAGS) \
579                         -DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"'
581 unit_bitmap_CFLAGS          = $(AM_CFLAGS) -O2 \
582                               -DENABLE_DRD_CONSISTENCY_CHECKS \
583                               @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
584 unit_bitmap_LDADD           = # nothing, i.e. not -lpthread
586 unit_vc_CFLAGS              = $(AM_CFLAGS) -DENABLE_DRD_CONSISTENCY_CHECKS
587 unit_vc_LDADD               = # nothing, i.e. not -lpthread
589 if HAVE_BOOST_1_35
590 boost_thread_SOURCES        = boost_thread.cpp
591 boost_thread_CXXFLAGS       = $(AM_CXXFLAGS) $(BOOST_CFLAGS)
592 boost_thread_LDADD          = $(BOOST_LIBS)
593 endif
595 if HAVE_BUILTIN_ATOMIC
596 annotate_smart_pointer_SOURCES = annotate_smart_pointer.cpp
597 endif
599 annotate_static_SOURCES     = annotate_static.cpp
600 annotate_static_CXXFLAGS    = $(AM_CXXFLAGS) @FLAG_W_NO_UNUSED_FUNCTION@
602 local_static_SOURCES        = local_static.cpp
604 if HAVE_OPENMP
605 omp_matinv_CFLAGS           = $(AM_CFLAGS) -fopenmp
606 omp_matinv_LDFLAGS          = -fopenmp
607 omp_matinv_LDADD            = $(LDADD) -lm
609 omp_prime_CFLAGS            = $(AM_CFLAGS) -fopenmp
610 omp_prime_LDFLAGS           = -fopenmp
611 omp_prime_LDADD             = $(LDADD) -lm
613 omp_printf_CFLAGS           = $(AM_CFLAGS) -fopenmp
614 omp_printf_LDFLAGS          = -fopenmp
615 omp_printf_LDADD            = $(LDADD) -lm
616 endif
618 matinv_CFLAGS               = $(AM_CFLAGS)
619 if VGCONF_OS_IS_SOLARIS
620 matinv_CFLAGS               += -D__EXTENSIONS__
621 endif
622 if HAVE_PTHREAD_BARRIER
623 matinv_LDADD                = $(LDADD) -lm
624 endif
626 rwlock_test_CFLAGS          = $(AM_CFLAGS) @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@
627 if VGCONF_OS_IS_SOLARIS
628 rwlock_test_CFLAGS          += -D__EXTENSIONS__
629 endif
631 shared_timed_mutex_SOURCES  = shared_timed_mutex.cpp
632 shared_timed_mutex_CXXFLAGS = $(AM_CXXFLAGS) -std=c++1y
634 std_atomic_SOURCES          = std_atomic.cpp
635 std_atomic_CXXFLAGS         = $(AM_CXXFLAGS) -std=c++0x @FLAG_W_NO_SIGN_COMPARE@
637 std_list_SOURCES            = std_list.cpp
638 std_list_CXXFLAGS           = $(AM_CXXFLAGS) -std=c++0x @FLAG_W_NO_SIGN_COMPARE@
640 std_mutex_SOURCES           = std_mutex.cpp
641 std_mutex_CXXFLAGS          = $(AM_CXXFLAGS) -std=c++0x @FLAG_W_NO_SIGN_COMPARE@
642 std_mutex_LDFLAGS           = -pthread
644 std_string_SOURCES          = std_string.cpp
645 std_string_CXXFLAGS         = $(AM_CXXFLAGS) -std=c++0x @FLAG_W_NO_SIGN_COMPARE@
647 # Note: -Wl,--no-as-needed is a workaround for
648 # https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201
650 std_thread_SOURCES          = std_thread.cpp
651 std_thread_CXXFLAGS         = $(AM_CXXFLAGS) -std=c++0x
652 if !VGCONF_OS_IS_SOLARIS
653 std_thread_LDFLAGS          = -Wl,--no-as-needed
654 endif
656 std_thread2_SOURCES          = std_thread2.cpp
657 std_thread2_CXXFLAGS         = $(AM_CXXFLAGS) -std=c++0x
658 if !VGCONF_OS_IS_SOLARIS
659 std_thread2_LDFLAGS          = -Wl,--no-as-needed
660 endif
662 sem_wait_SOURCES            = sem_wait.cpp
664 swapcontext_SOURCES         = swapcontext.c
665 swapcontext_CFLAGS          = $(AM_CFLAGS) -g
666 if VGCONF_OS_IS_SOLARIS
667 swapcontext_CFLAGS          += -D__EXTENSIONS__
668 endif
670 timed_mutex_SOURCES         = timed_mutex.cpp
671 timed_mutex_CXXFLAGS        = $(AM_CXXFLAGS) -std=c++0x
673 thrd_create_SOURCES         = thrd_create.c
674 if VGCONF_OS_IS_FREEBSD
675 thrd_create_LDFLAGS          = -lstdthreads
676 endif