]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Various build system clean-ups and simplifications:
authorNicholas Nethercote <njn@valgrind.org>
Thu, 19 Feb 2009 09:52:05 +0000 (09:52 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Thu, 19 Feb 2009 09:52:05 +0000 (09:52 +0000)
- Created Makefile.tool-tests.am, put standard AM_CFLAGS et al for tests in
  it.
- A number of tests are shared between Helgrind and DRD.  They used to be
  built in both directories.  Now they are only built in helgrind/tests/,
  and the DRD .vgtest files just point to the executable in helgrind/tests/.
  Most of these (about 30) had the source files in helgrind/tests/;  I moved
  the three that were in drd/tests/ into helgrind/tests/ for consistency.
- Fixed rwlock_test, which was failing to run due to a wrong name in the
  .vgtest file.
- Removed remnants of unused 'hello' test for Memcheck.
- Avoided redundant flag specification in various places, esp.
  memcheck/tests/Makefile.am.
- Removed unnecessary _AIX guards in some Linux-only tests.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9202

63 files changed:
Makefile.tool-tests.am [new file with mode: 0644]
cachegrind/tests/Makefile.am
callgrind/tests/Makefile.am
drd/tests/Makefile.am
drd/tests/bar_bad.vgtest
drd/tests/bar_trivial.vgtest
drd/tests/hg01_all_ok.vgtest
drd/tests/hg02_deadlock.vgtest
drd/tests/hg03_inherit.vgtest
drd/tests/hg04_race.vgtest
drd/tests/hg05_race2.vgtest
drd/tests/hg06_readshared.vgtest
drd/tests/pth_barrier.vgtest
drd/tests/pth_barrier2.vgtest
drd/tests/pth_barrier3.vgtest
drd/tests/rwlock_race.vgtest
drd/tests/rwlock_test.stderr.exp
drd/tests/rwlock_test.vgtest
drd/tests/tc01_simple_race.vgtest
drd/tests/tc02_simple_tls.vgtest
drd/tests/tc03_re_excl.vgtest
drd/tests/tc04_free_lock.vgtest
drd/tests/tc05_simple_race.vgtest
drd/tests/tc06_two_races.vgtest
drd/tests/tc07_hbl1.vgtest
drd/tests/tc08_hbl2.vgtest
drd/tests/tc09_bad_unlock.vgtest
drd/tests/tc10_rec_lock.vgtest
drd/tests/tc11_XCHG.vgtest
drd/tests/tc12_rwl_trivial.vgtest
drd/tests/tc13_laog1.vgtest
drd/tests/tc15_laog_lockdel.vgtest
drd/tests/tc16_byterace.vgtest
drd/tests/tc17_sembar.vgtest
drd/tests/tc18_semabuse.vgtest
drd/tests/tc19_shadowmem.vgtest
drd/tests/tc20_verifywrap.vgtest
drd/tests/tc20_verifywrap2.vgtest
drd/tests/tc21_pthonce.vgtest
drd/tests/tc22_exit_w_lock.vgtest
drd/tests/tc23_bogus_condwait.vgtest
drd/tests/tc24_nonzero_sem.vgtest
exp-ptrcheck/tests/Makefile.am
helgrind/tests/Makefile.am
helgrind/tests/pth_barrier.c [moved from drd/tests/pth_barrier.c with 100% similarity]
helgrind/tests/rwlock_race.c [moved from drd/tests/rwlock_race.c with 100% similarity]
helgrind/tests/rwlock_test.c [moved from drd/tests/rwlock_test.c with 100% similarity]
massif/tests/Makefile.am
memcheck/tests/Makefile.am
memcheck/tests/amd64/Makefile.am
memcheck/tests/hello.c [deleted file]
memcheck/tests/linux/Makefile.am
memcheck/tests/linux/brk.c
memcheck/tests/linux/timerfd-syscall.c
memcheck/tests/x86-linux/Makefile.am
memcheck/tests/x86/Makefile.am
none/tests/Makefile.am
none/tests/amd64/Makefile.am
none/tests/linux/Makefile.am
none/tests/ppc32/Makefile.am
none/tests/ppc64/Makefile.am
none/tests/x86/Makefile.am
perf/Makefile.am

diff --git a/Makefile.tool-tests.am b/Makefile.tool-tests.am
new file mode 100644 (file)
index 0000000..7119201
--- /dev/null
@@ -0,0 +1,12 @@
+include $(top_srcdir)/Makefile.flags.am     # For AM_FLAG_M3264_PRI
+
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
+               -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
+               -I@VEX_DIR@/pub \
+               -DVGA_$(VGCONF_ARCH_PRI)=1 \
+               -DVGO_$(VGCONF_OS)=1 \
+               -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
+AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
+AM_CXXFLAGS = $(AM_CFLAGS)
+
+
index 8e568cc379fa929309cfc564717bf74b3189b2c4..d7eee5a0394044b9b9d390513500b3eaaed04934 100644 (file)
@@ -1,6 +1,5 @@
 
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
+include $(top_srcdir)/Makefile.tool-tests.am
 
 SUBDIRS = .
 if VGCONF_ARCHS_INCLUDE_X86
@@ -21,11 +20,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
 check_PROGRAMS = \
        chdir clreq dlclose myprint.so
 
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-
 # C ones
 dlclose_LDADD          = -ldl
-myprint_so_SOURCES     = myprint.c
 myprint_so_LDFLAGS     = $(AM_FLAG_M3264_PRI) -shared -fPIC
-myprint_so_CFLAGS      = $(AM_FLAG_M3264_PRI) -fPIC
+myprint_so_CFLAGS      = $(AM_CFLAGS) -fPIC
index 1c3f42c070e11a639c207729f9a8927dc85fc135..aaba37c0c54452c97da8ad1bc5ce0808f1d4d066 100644 (file)
@@ -1,5 +1,5 @@
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
+
+include $(top_srcdir)/Makefile.tool-tests.am
 
 SUBDIRS = .
 DIST_SUBDIRS = .
@@ -19,7 +19,4 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
 
 check_PROGRAMS = clreq simwork threads
 
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-
 threads_LDADD = -lpthread
index aa82a36a7efc2f6819f308396212f22773b9e278..630b4c92fd74be9ffb0bc37b4178172ef25daff4 100644 (file)
@@ -1,5 +1,5 @@
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
+
+include $(top_srcdir)/Makefile.tool-tests.am
 
 SUBDIRS = .
 
@@ -193,24 +193,11 @@ EXTRA_DIST =                                        \
        trylock.stderr.exp                          \
        trylock.vgtest
 
-AM_CFLAGS   = $(WERROR) -Wall @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter\
-              -g $(AM_FLAG_M3264_PRI) -DVGA_$(VGCONF_ARCH_PRI)=1 \
-             -DVGO_$(VGCONF_OS)=1 -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
-              -I$(top_builddir)/include -I$(top_srcdir)/VEX/pub
-AM_CXXFLAGS = $(AM_CFLAGS)
-
 check_PROGRAMS =      \
   atomic_var          \
   circular_buffer     \
   drd_bitmap_test     \
   fp_race             \
-  hg01_all_ok         \
-  hg02_deadlock       \
-  hg03_inherit        \
-  hg04_race           \
-  hg05_race2          \
-  hg06_readshared     \
   hold_lock           \
   linuxthreads_det    \
   memory_allocation   \
@@ -224,32 +211,8 @@ check_PROGRAMS =      \
   pth_detached_sem    \
   pth_inconsistent_cond_wait \
   recursive_mutex     \
-  rwlock_race         \
-  rwlock_test         \
   sem_as_mutex        \
   sigalrm             \
-  tc01_simple_race    \
-  tc02_simple_tls     \
-  tc03_re_excl        \
-  tc04_free_lock      \
-  tc05_simple_race    \
-  tc06_two_races      \
-  tc07_hbl1           \
-  tc08_hbl2           \
-  tc09_bad_unlock     \
-  tc10_rec_lock       \
-  tc11_XCHG           \
-  tc12_rwl_trivial    \
-  tc13_laog1          \
-  tc15_laog_lockdel   \
-  tc16_byterace       \
-  tc17_sembar         \
-  tc18_semabuse       \
-  tc19_shadowmem      \
-  tc21_pthonce        \
-  tc22_exit_w_lock    \
-  tc23_bogus_condwait \
-  tc24_nonzero_sem    \
   trylock
 
 if HAVE_BOOST_1_35
@@ -261,11 +224,7 @@ check_PROGRAMS += omp_matinv omp_prime omp_printf
 endif
 
 if HAVE_PTHREAD_BARRIER
-check_PROGRAMS += bar_bad bar_trivial matinv pth_barrier pth_barrier_reinit
-endif
-
-if HAVE_PTHREAD_MUTEX_TIMEDLOCK
-check_PROGRAMS += tc20_verifywrap
+check_PROGRAMS += matinv pth_barrier_reinit
 endif
 
 if HAVE_PTHREAD_SPINLOCK
@@ -277,156 +236,18 @@ check_PROGRAMS += qt4_mutex qt4_rwlock qt4_semaphore
 endif
 
 
-atomic_var_SOURCES          = atomic_var.c
-atomic_var_LDADD            = -lpthread
+AM_CFLAGS += @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
+LDADD = -lpthread
 
-circular_buffer_SOURCES     = circular_buffer.c
-circular_buffer_LDADD       = -lpthread
 
-drd_bitmap_test_SOURCES     = drd_bitmap_test.c
 drd_bitmap_test_CFLAGS      = $(AM_CFLAGS) -O2 \
                               -DENABLE_DRD_CONSISTENCY_CHECKS\
                               @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
-
-fp_race_SOURCES             = fp_race.c
-fp_race_LDADD               = -lpthread
-
-hg01_all_ok_SOURCES         = ../../helgrind/tests/hg01_all_ok.c
-hg01_all_ok_LDADD           = -lpthread
-
-hg02_deadlock_SOURCES       = ../../helgrind/tests/hg02_deadlock.c
-hg02_deadlock_LDADD         = -lpthread
-
-hg03_inherit_SOURCES        = ../../helgrind/tests/hg03_inherit.c
-hg03_inherit_LDADD          = -lpthread
-
-hg04_race_SOURCES           = ../../helgrind/tests/hg04_race.c
-hg04_race_LDADD             = -lpthread
-
-hg05_race2_SOURCES          = ../../helgrind/tests/hg05_race2.c
-hg05_race2_LDADD            = -lpthread
-
-hg06_readshared_SOURCES     = ../../helgrind/tests/hg06_readshared.c
-hg06_readshared_LDADD       = -lpthread
-
-hold_lock_SOURCES           = hold_lock.c
-hold_lock_LDADD             = -lpthread
-
-linuxthreads_det_SOURCES    = linuxthreads_det.c
-linuxthreads_det_LDADD      = -lpthread
-
-memory_allocation_SOURCES   = memory_allocation.c
+drd_bitmap_test_LDADD       = # nothing, ie. not -lpthread
 
 monitor_example_SOURCES     = monitor_example.cpp
-monitor_example_LDADD       = -lpthread
-
 new_delete_SOURCES          = new_delete.cpp
 
-pth_broadcast_SOURCES       = pth_broadcast.c
-pth_broadcast_LDADD         = -lpthread
-
-pth_cancel_locked_SOURCES   = pth_cancel_locked.c
-pth_cancel_locked_LDADD     = -lpthread
-
-pth_cond_race_SOURCES       = pth_cond_race.c
-pth_cond_race_LDADD         = -lpthread
-
-pth_create_chain_SOURCES    = pth_create_chain.c
-pth_create_chain_LDADD      = -lpthread
-
-pth_detached_SOURCES        = pth_detached.c
-pth_detached_LDADD          = -lpthread
-
-pth_detached_sem_SOURCES    = pth_detached_sem.c
-pth_detached_sem_LDADD      = -lpthread
-
-pth_inconsistent_cond_wait_SOURCES = pth_inconsistent_cond_wait.c
-pth_inconsistent_cond_wait_LDADD   = -lpthread
-
-recursive_mutex_SOURCES     = recursive_mutex.c
-recursive_mutex_LDADD       = -lpthread
-
-rwlock_race_SOURCES         = rwlock_race.c
-rwlock_race_LDADD           = -lpthread
-
-rwlock_test_SOURCES         = rwlock_test.c
-rwlock_test_LDADD           = -lpthread
-
-sem_as_mutex_SOURCES        = sem_as_mutex.c
-sem_as_mutex_LDADD          = -lpthread
-
-sigalrm_SOURCES             = sigalrm.c
-sigalrm_LDADD               = -lpthread
-
-tc01_simple_race_SOURCES    = ../../helgrind/tests/tc01_simple_race.c
-tc01_simple_race_LDADD      = -lpthread
-
-tc02_simple_tls_SOURCES     = ../../helgrind/tests/tc02_simple_tls.c
-tc02_simple_tls_LDADD       = -lpthread
-
-tc03_re_excl_SOURCES        = ../../helgrind/tests/tc03_re_excl.c
-tc03_re_excl_LDADD          = -lpthread
-
-tc04_free_lock_SOURCES      = ../../helgrind/tests/tc04_free_lock.c
-tc04_free_lock_LDADD        = -lpthread
-
-tc05_simple_race_SOURCES    = ../../helgrind/tests/tc05_simple_race.c
-tc05_simple_race_LDADD      = -lpthread
-
-tc06_two_races_SOURCES      = ../../helgrind/tests/tc06_two_races.c
-tc06_two_races_LDADD        = -lpthread
-
-tc07_hbl1_SOURCES           = ../../helgrind/tests/tc07_hbl1.c
-tc07_hbl1_LDADD             = -lpthread
-
-tc08_hbl2_SOURCES           = ../../helgrind/tests/tc08_hbl2.c
-tc08_hbl2_LDADD             = -lpthread
-
-tc09_bad_unlock_SOURCES     = ../../helgrind/tests/tc09_bad_unlock.c
-tc09_bad_unlock_LDADD       = -lpthread
-
-tc10_rec_lock_SOURCES       = ../../helgrind/tests/tc10_rec_lock.c
-tc10_rec_lock_LDADD         = -lpthread
-
-tc11_XCHG_SOURCES           = ../../helgrind/tests/tc11_XCHG.c
-tc11_XCHG_LDADD             = -lpthread
-
-tc12_rwl_trivial_SOURCES    = ../../helgrind/tests/tc12_rwl_trivial.c
-tc12_rwl_trivial_LDADD      = -lpthread
-
-tc13_laog1_SOURCES          = ../../helgrind/tests/tc13_laog1.c
-tc13_laog1_LDADD            = -lpthread
-
-tc15_laog_lockdel_SOURCES   = ../../helgrind/tests/tc15_laog_lockdel.c
-tc15_laog_lockdel_LDADD     = -lpthread
-
-tc16_byterace_SOURCES       = ../../helgrind/tests/tc16_byterace.c
-tc16_byterace_LDADD         = -lpthread
-
-tc17_sembar_SOURCES         = ../../helgrind/tests/tc17_sembar.c
-tc17_sembar_LDADD           = -lpthread
-
-tc18_semabuse_SOURCES       = ../../helgrind/tests/tc18_semabuse.c
-tc18_semabuse_LDADD         = -lpthread
-
-tc19_shadowmem_SOURCES      = ../../helgrind/tests/tc19_shadowmem.c
-tc19_shadowmem_LDADD        = -lpthread
-
-tc21_pthonce_SOURCES        = ../../helgrind/tests/tc21_pthonce.c
-tc21_pthonce_LDADD          = -lpthread
-
-tc22_exit_w_lock_SOURCES    = ../../helgrind/tests/tc22_exit_w_lock.c
-tc22_exit_w_lock_LDADD      = -lpthread
-
-tc23_bogus_condwait_SOURCES = ../../helgrind/tests/tc23_bogus_condwait.c
-tc23_bogus_condwait_LDADD   = -lpthread
-
-tc24_nonzero_sem_SOURCES    = ../../helgrind/tests/tc24_nonzero_sem.c
-tc24_nonzero_sem_LDADD      = -lpthread
-
-trylock_SOURCES             = trylock.c
-trylock_LDADD               = -lpthread
-
 if HAVE_BOOST_1_35
 boost_thread_SOURCES        = boost_thread.cpp
 boost_thread_CXXFLAGS       = $(AM_CXXFLAGS) $(BOOST_CFLAGS)
@@ -434,59 +255,33 @@ boost_thread_LDADD          = $(BOOST_LIBS)
 endif
 
 if HAVE_OPENMP
-omp_matinv_SOURCES          = omp_matinv.c
 omp_matinv_CFLAGS           = $(AM_CFLAGS) -fopenmp
 omp_matinv_LDFLAGS          = -fopenmp
-omp_matinv_LDADD            = -lm
+omp_matinv_LDADD            = $(LDADD) -lm
 
-omp_prime_SOURCES           = omp_prime.c
 omp_prime_CFLAGS            = $(AM_CFLAGS) -fopenmp
 omp_prime_LDFLAGS           = -fopenmp
-omp_prime_LDADD             = -lm
+omp_prime_LDADD             = $(LDADD) -lm
 
-omp_printf_SOURCES          = omp_printf.c
 omp_printf_CFLAGS           = $(AM_CFLAGS) -fopenmp
 omp_printf_LDFLAGS          = -fopenmp
-omp_printf_LDADD            = -lm
+omp_printf_LDADD            = $(LDADD) -lm
 endif
 
 if HAVE_PTHREAD_BARRIER
-bar_bad_SOURCES             = ../../helgrind/tests/bar_bad.c
-bar_bad_LDADD               = -lpthread
-
-bar_trivial_SOURCES         = ../../helgrind/tests/bar_trivial.c
-bar_trivial_LDADD           = -lpthread
-
-matinv_SOURCES              = matinv.c
-matinv_LDADD                = -lpthread -lm
-
-pth_barrier_SOURCES         = pth_barrier.c
-pth_barrier_LDADD           = -lpthread
-
-pth_barrier_reinit_SOURCES  = pth_barrier_reinit.c
-pth_barrier_reinit_LDADD    = -lpthread
-endif
-
-if HAVE_PTHREAD_MUTEX_TIMEDLOCK
-tc20_verifywrap_SOURCES     = ../../helgrind/tests/tc20_verifywrap.c
-tc20_verifywrap_LDADD       = -lpthread
-endif
-
-if HAVE_PTHREAD_SPINLOCK
-pth_spinlock_SOURCES        = pth_spinlock.c
-pth_spinlock_LDADD          = -lpthread
+matinv_LDADD                = $(LDADD) -lm
 endif
 
 if HAVE_QTCORE
 qt4_mutex_SOURCES           = qt4_mutex.cpp
 qt4_mutex_CXXFLAGS          = $(AM_CXXFLAGS) $(QTCORE_CFLAGS)
-qt4_mutex_LDADD             = $(QTCORE_LIBS)
+qt4_mutex_LDADD             = $(LDADD) $(QTCORE_LIBS)
 
 qt4_rwlock_SOURCES          = qt4_rwlock.cpp
 qt4_rwlock_CXXFLAGS         = $(AM_CXXFLAGS) $(QTCORE_CFLAGS)
-qt4_rwlock_LDADD            = $(QTCORE_LIBS)
+qt4_rwlock_LDADD            = $(LDADD) $(QTCORE_LIBS)
 
 qt4_semaphore_SOURCES       = qt4_semaphore.cpp
 qt4_semaphore_CXXFLAGS      = $(AM_CXXFLAGS) $(QTCORE_CFLAGS)
-qt4_semaphore_LDADD         = $(QTCORE_LIBS)
+qt4_semaphore_LDADD         = $(LDADD) $(QTCORE_LIBS)
 endif
index 8feedb337344b2293e9a34993c9aa52f4cb2588c..f4946be30d53cf0fc9f14c42099d6db2fc46d8f8 100644 (file)
@@ -1,3 +1,3 @@
-prereq: test -e bar_bad && ./supported_libpthread
-prog: bar_bad
+prereq: test -e ../../helgrind/tests/bar_bad && ./supported_libpthread
+prog: ../../helgrind/tests/bar_bad
 vgopts: -q
index 25fcee7c7a1efc96723c471422b661771fb700a0..e67f1d64f2fb4acfb5bb5c369332d944f6430294 100644 (file)
@@ -1,3 +1,3 @@
-prereq: test -e bar_trivial && ./supported_libpthread
-prog: bar_trivial
+prereq: test -e ../../helgrind/tests/bar_trivial && ./supported_libpthread
+prog: ../../helgrind/tests/bar_trivial
 vgopts: -q
index 6cf7cda3285e3c1cc4b6d1790875a00cb60cdcda..f3409b61d10c3bd78acd64fb8f340e0b37643965 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: hg01_all_ok
+prog: ../../helgrind/tests/hg01_all_ok
index b8fab93cb9678128e16f46fd627dd3285b20a1cc..8ee583cc91c7a39dd488da77c743ba4d09fc0556 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: hg02_deadlock
+prog: ../../helgrind/tests/hg02_deadlock
index e7b2431bb29483dd80b3433a987a453f6bd10c39..a251867f33d7d403d2d6b17d4265abaa1ded76e9 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
 vgopts: --show-confl-seg=no --var-info=yes
-prog: hg03_inherit
+prog: ../../helgrind/tests/hg03_inherit
index 173c17c33aa0d18b2da198df5e658b71193f1a88..49c8633c1a1c3763c21afd0fe1fe6f76ce410a5c 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
 vgopts: --var-info=yes
-prog: hg04_race
+prog: ../../helgrind/tests/hg04_race
index 21dbf5a1dd2ab7b74027a0d568cdd1a6b1e20404..ba1044f578ed8a74600db4d1519e06c3f9bac07e 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
 vgopts: --var-info=yes --check-stack-var=yes
-prog: hg05_race2
+prog: ../../helgrind/tests/hg05_race2
index 6111b7e7c9ed1cef548bada7c77ff025daecb1f7..18cb7c45c6670eb5647159211dd331550efe5661 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: hg06_readshared
+prog: ../../helgrind/tests/hg06_readshared
index adc781d14254986ea6db53d5849c8d1fedecc6ac..3f15c0e73b861715943500362f70b3e1bd232670 100644 (file)
@@ -1,4 +1,4 @@
-prereq: test -e pth_barrier && ./supported_libpthread
-prog: pth_barrier
+prereq: test -e ../../helgrind/tests/pth_barrier && ./supported_libpthread
+prog: ../../helgrind/tests/pth_barrier
 args: 2 1 1
 stderr_filter: filter_error_summary
index 1fe94089a69bfda2d6f288b9e333f5767934169d..bedb84161d94984b76e5f3d8166b437e652bb90c 100644 (file)
@@ -1,4 +1,4 @@
-prereq: test -e pth_barrier && ./supported_libpthread
-prog: pth_barrier
+prereq: test -e ../../helgrind/tests/pth_barrier && ./supported_libpthread
+prog: ../../helgrind/tests/pth_barrier
 args: 2 32 1
 stderr_filter: filter_error_summary
index c17edb19a07a449c8f6633d594946418be0d7cbb..562866e49bd866845bff2348933fece9952c917b 100644 (file)
@@ -1,4 +1,4 @@
-prereq: test -e pth_barrier && ./supported_libpthread
-prog: pth_barrier
+prereq: test -e ../../helgrind/tests/pth_barrier && ./supported_libpthread
+prog: ../../helgrind/tests/pth_barrier
 args: 32 1 1
 stderr_filter: filter_error_summary
index 856138b2b7e85e21ad6b585a561c7bfc9108aec7..5a76b2c0f1e99dc76d3e3d2c6ab6cfd6c8d18a64 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
 vgopts: --var-info=yes
-prog: rwlock_race
+prog: ../../helgrind/tests/rwlock_race
index 876814feecf9b04fefd0ed3fdd9d70b8fa794390..a7089bb434c9dde3bb9fba2f44cbaee14d5a74af 100644 (file)
@@ -1 +1,4 @@
-valgrind: ./rwlock_vgtest: No such file or directory
+
+Finished.
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
index bb5a6a732560e17f5a4f37f5f350896e6b45e253..2188dc6a577513efb95e5210cee4542d9c16daa6 100644 (file)
@@ -1 +1 @@
-prog: rwlock_vgtest
+prog: ../../helgrind/tests/rwlock_test
index bfd087921194266fddc357aa9efa10e4bf7176e1..bb3582fe8935b87a683222b89a3bcd525d7a985d 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
 vgopts: --var-info=yes
-prog: tc01_simple_race
+prog: ../../helgrind/tests/tc01_simple_race
index 61425ecc461861b7500354839234c99de77ef083..016d7499285db223d936a5239336e99fc9a5ec1d 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc02_simple_tls
+prog: ../../helgrind/tests/tc02_simple_tls
index e687aa2a2242bf3729ebbfe6b154c668f820983f..ee5f031b0b2a2cb1bccab5e00e7ca2fceaeb0fa7 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc03_re_excl
+prog: ../../helgrind/tests/tc03_re_excl
index a359d307f3756459a9b2dd18954bcbaafb4ae557..c8ae55caeb6a4f9a87ec9ce18f5a45cb53da5f85 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
 vgopts: --check-stack-var=yes
-prog: tc04_free_lock
+prog: ../../helgrind/tests/tc04_free_lock
index f437c537c33a9df69822fa06fa098773f795d2e9..fe34a1f5bbf31526e8ce57147fc5e07a81dde3fe 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
-prog: tc05_simple_race
+prog: ../../helgrind/tests/tc05_simple_race
 stderr_filter: filter_error_summary
index d52f3a447dc214b2710316fd6e0e72427cd9ff6b..7f80dbaf37a4322951518914a05759a9ef59770c 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
-prog: tc06_two_races
+prog: ../../helgrind/tests/tc06_two_races
 stderr_filter: filter_error_summary
index b9eba4e91056ff62f08d2489ebaaebc0096b21ae..b8eb6394b1441fb34adb50549624c9b9563d95da 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc07_hbl1
+prog: ../../helgrind/tests/tc07_hbl1
index 0d70d263be2a1274787841c330c4adb678a5f000..1ee1841f248364752da9c6e7cfb036169a70f33d 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc08_hbl2
+prog: ../../helgrind/tests/tc08_hbl2
index 980287b6db444024c8520a4364634c01e66e719d..6956620ca00d74d9a88baa5f0e184b1f65afbe45 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
 vgopts: --check-stack-var=yes
-prog: tc09_bad_unlock
+prog: ../../helgrind/tests/tc09_bad_unlock
index 8176d8af17786f16e8dd0cd9cbe83a260dcf89ab..af3582fc0e885773d673f44ff74ea6a135d3890c 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc10_rec_lock
+prog: ../../helgrind/tests/tc10_rec_lock
index e8376f37bb4f4d6f7a243dcf384924b5aa0448a8..75e4cfc05ef1d61af1b1628eaf25c4828ba36193 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc11_XCHG
+prog: ../../helgrind/tests/tc11_XCHG
index a9cbb54fb26daab8c7e274c1dcfaa166fa0f6570..0cb3825cbf47c0a03fcd93cd0f03a85e40c4431a 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc12_rwl_trivial
+prog: ../../helgrind/tests/tc12_rwl_trivial
index b6beee02300ebd8e32bec153b5524604ff18dae2..67bae563f87bcf018bedf1ae5c51e4a457ab987c 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc13_laog1
+prog: ../../helgrind/tests/tc13_laog1
index 72a05f7692d0355ea7d1c1037df3ee7f3ce4faa8..0bed9382556008164b6371a06566884f092f68af 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc15_laog_lockdel
+prog: ../../helgrind/tests/tc15_laog_lockdel
index b6f47e61c371a6244de0d8215e40191d6fdb5460..18b16b74d420c54b19a9aaae3ac76140aea23489 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
 vgopts: --var-info=yes
-prog: tc16_byterace
+prog: ../../helgrind/tests/tc16_byterace
index deb4d67ca084832de4eed1b710533118edccab77..8cede497eec1680a55b7494c4b92a846e6f82982 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc17_sembar
+prog: ../../helgrind/tests/tc17_sembar
index fe82010a00e1865b578c2438cc22750ca8ffd2f8..16b8ecc237ea4110165cabd79e487c30db883330 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc18_semabuse
+prog: ../../helgrind/tests/tc18_semabuse
index d90d50a57fa7322ce5e646490b36c918f0c09935..2b2b1a23527e06db381d5b7631ad775578ee1ac7 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
-prog: tc19_shadowmem
+prog: ../../helgrind/tests/tc19_shadowmem
 vgopts: --cmp-race-err-addrs=yes --error-limit=no
index c707a6eed4045ea5b6e65a1e5dede66246a8da1e..64a496002d8421db11ff90785c3bcc9a773d85ab 100644 (file)
@@ -1,3 +1,3 @@
-prereq: test -e tc20_verifywrap && ./supported_libpthread
+prereq: test -e ../../helgrind/tests/tc20_verifywrap && ./supported_libpthread
 vgopts: --var-info=yes --check-stack-var=yes
-prog: tc20_verifywrap
+prog: ../../helgrind/tests/tc20_verifywrap
index 593e11442de593cead34be44532bc078331fc2b9..042ef42a572f8f458642fe8df4cfe620d36c05be 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
 vgopts: --trace-mutex=yes --trace-cond=yes --trace-semaphore=yes --var-info=yes --check-stack-var=yes
-prog: tc20_verifywrap
+prog: ../../helgrind/tests/tc20_verifywrap
index 450fa12e7c2a0cdd7b9c90443386d139d0ef2d24..b9fa8f759989ad0de442566f8e00df0a1400f3cb 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc21_pthonce
+prog: ../../helgrind/tests/tc21_pthonce
index b5718adbf80b41eb38f7afb857c6b35f0dabd2f2..c57698e79ffea3bc88dc8b2e40cf5dde24033e8f 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc22_exit_w_lock
+prog: ../../helgrind/tests/tc22_exit_w_lock
index 1819fb1170bd52a9bc95363bce8bf816a06c4eb5..87b4c3ba1ccca579b3c94f0dd1ed1f01debbbc50 100644 (file)
@@ -1,2 +1,2 @@
 prereq: ./supported_libpthread
-prog: tc23_bogus_condwait
+prog: ../../helgrind/tests/tc23_bogus_condwait
index 936db2c5a7d48bd5176dc24512897d9af8f1368e..dbff0511fe13a65d4ddfdd07d939dc9d86185486 100644 (file)
@@ -1,3 +1,3 @@
 prereq: ./supported_libpthread
-prog: tc24_nonzero_sem
+prog: ../../helgrind/tests/tc24_nonzero_sem
 vgopts: --hg-sanity-flags=111111
index d382cac9bfc870afeb59d1c875f8ce02112b174f..b7e3b155005859ced1bc6e334b1001760d449064 100644 (file)
@@ -1,6 +1,5 @@
 
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
+include $(top_srcdir)/Makefile.tool-tests.am
 
 #SUBDIRS = .
 #if VGCONF_ARCHS_INCLUDE_X86
@@ -76,57 +75,18 @@ check_PROGRAMS = \
        stackerr \
        strcpy strlen sub supp syscall tricky unaligned xor zero
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
-               -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
-               -I@VEX_DIR@/pub
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-AM_CXXFLAGS = $(AM_CFLAGS)
-
 # To make it a bit more realistic, build hackedbz2.c with at 
 # least some optimisation.
-hackedbz2_CFLAGS       = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
+hackedbz2_CFLAGS       = $(AM_CFLAGS) -O
 
 # C ones
-add_SOURCES            = add.c
-and_SOURCES            = and.c
-arith_SOURCES          = arith.c
-bad_percentify_SOURCES = bad_percentify.c
-base_SOURCES           = base.c
-cmp_SOURCES            = cmp.c
-fp_SOURCES             = fp.c
-globalerr_SOURCE       = globalerr.c
-hackedbz2_SOURCES      = hackedbz2.c
-hp_bounds_SOURCES      = hp_bounds.c
-hp_dangle_SOURCES      = hp_dangle.c
-idiv_SOURCES           = idiv.c
-imul_SOURCES           = imul.c
-justify_SOURCES                = justify.c
-mm_SOURCES             = mm.c
-neg_SOURCES            = neg.c
-not_SOURCES            = not.c
-or_SOURCES             = or.c
-partial_SOURCES                = partial.c
-pth_create_SOURCES     = pth_create.c
 pth_create_LDADD       = -lpthread
-pth_specific_SOURCES   = pth_specific.c
 pth_specific_LDADD     = -lpthread
-realloc_SOURCES                = realloc.c
-stackerr_SOURCES       = stackerr.c
-strcpy_SOURCES         = strcpy.c
-strlen_SOURCES         = strlen.c
-sub_SOURCES            = sub.c
-supp_SOURCES           = supp.c
-syscall_SOURCES                = syscall.c
-tricky_SOURCES         = tricky.c
-unaligned_SOURCES      = unaligned.c
-xor_SOURCES            = xor.c
-zero_SOURCES           = zero.c
 
 # C++ ones
 ccc_SOURCES            = ccc.cpp
 
 # Build shared object for preen_invars
-preen_invars_SOURCES           = preen_invars.c
 preen_invars_DEPENDENCIES      = preen_invars_so.so
 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5 
  preen_invars_LDADD            = -ldl
@@ -142,10 +102,7 @@ else
 endif
 endif
 
-preen_invars_so_so_SOURCES      = preen_invars_so.c
-preen_invars_so_so_LDADD        = 
-preen_invars_so_so_DEPENDENCIES = 
-preen_invars_so_so_CFLAGS       = -fpic $(AM_FLAG_M3264_PRI) -g
+preen_invars_so_so_CFLAGS       = $(AM_CFLAGS) -fpic
 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
  preen_invars_so_so_LDFLAGS     = -fpic $(AM_FLAG_M3264_PRI) -shared
 else
index ca04f453165ad89ec53fc46407eee297909d34a5..23d84428e2fda335fbd03cc8e56a994ba41ae86c 100644 (file)
@@ -1,6 +1,5 @@
 
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
+include $(top_srcdir)/Makefile.tool-tests.am
 
 noinst_SCRIPTS = filter_stderr
 
@@ -159,15 +158,5 @@ check_PROGRAMS += bar_bad bar_trivial pth_barrier
 endif
 
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
-                -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
-                -I@VEX_DIR@/pub
+LDADD = -lpthread
 
-# are these necessary?
-AM_CFLAGS      = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-LDADD          = -lpthread
-
-# only needed because of referencing sources in drd/tests
-pth_barrier_SOURCES    = ../../drd/tests/pth_barrier.c
-rwlock_race_SOURCES    = ../../drd/tests/rwlock_race.c
-rwlock_test_SOURCES    = ../../drd/tests/rwlock_test.c
index 7408acd6649b8287ca394ebf14da9e0d876c1cf5..68f4ec95e466a657dfe75a20f21dcd61ca221db7 100644 (file)
@@ -1,6 +1,5 @@
 
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
+include $(top_srcdir)/Makefile.tool-tests.am
 
 noinst_SCRIPTS = filter_stderr filter_verbose
 
@@ -41,12 +40,6 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
        zero1.post.exp zero1.stderr.exp zero1.vgtest \
        zero2.post.exp zero2.stderr.exp zero2.vgtest
 
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
-               -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
-               -I@VEX_DIR@/pub
-
 check_PROGRAMS = \
        alloc-fns \
        basic \
index 5fa4891cbbe7a9e74385be253eb78777e477aef1..d0fb56c02aca3ecbd5f6ef7ac043ff7a5e1e3716 100644 (file)
@@ -1,6 +1,5 @@
 
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
+include $(top_srcdir)/Makefile.tool-tests.am
 
 SUBDIRS = .
 
@@ -190,7 +189,7 @@ check_PROGRAMS = \
        describe-block \
        doublefree error_counts errs1 exitprog execve execve2 erringfds \
        file_locking \
-       fprw fwrite hello inits inline \
+       fprw fwrite inits inline \
        leak-0 leak-cycle leak-pool leak-tree leak-regroot leakotron \
        linux-syslog-syscall \
        linux-syscalls-2007 \
@@ -226,23 +225,13 @@ check_PROGRAMS = \
        writev zeropage
 
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
-               -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
-               -I@VEX_DIR@/pub
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-AM_CXXFLAGS = $(AM_CFLAGS)
-
 # Extra stuff for C tests
-memcmptest_CFLAGS      = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -fno-builtin-memcmp
-oset_test_CFLAGS       = $(AM_FLAG_M3264_PRI) \
-                               -DVGA_$(VGCONF_ARCH_PRI)=1 \
-                               -DVGO_$(VGCONF_OS)=1 \
-                               -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
-vcpu_bz2_CFLAGS                = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
-vcpu_fbench_CFLAGS     = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
-vcpu_fnfns_CFLAGS      = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
+memcmptest_CFLAGS      = $(AM_CFLAGS) -fno-builtin-memcmp
+vcpu_bz2_CFLAGS                = $(AM_CFLAGS) -O2
+vcpu_fbench_CFLAGS     = $(AM_CFLAGS) -O2
+vcpu_fnfns_CFLAGS      = $(AM_CFLAGS) -O2
 vcpu_fnfns_LDADD       = -lm
-wrap6_CFLAGS           = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
+wrap6_CFLAGS           = $(AM_CFLAGS) -O2
 
 # Don't allow GCC to inline memcpy(), because then we can't intercept it
 overlap_CFLAGS         = $(AM_CFLAGS) -fno-builtin-memcpy
@@ -252,17 +241,17 @@ supp1_SOURCES             = supp.c
 supp2_SOURCES          = supp.c
 # To make it a bit more realistic, have some optimisation enabled
 # for the varinfo tests.  We still expect sane results.
-varinfo1_CFLAGS                = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-varinfo2_CFLAGS                = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g -Wno-shadow
-varinfo3_CFLAGS                = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-varinfo4_CFLAGS                = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-varinfo5_CFLAGS                = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-varinfo6_CFLAGS                = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-# This requires optimisation in order to get just one resulting error
-origin4_many_CFLAGS    = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-# Apply -O so as to run in reasonable time
-origin5_bz2_CFLAGS     = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-origin6_fp_CFLAGS      = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
+varinfo1_CFLAGS                = $(AM_CFLAGS) -O
+varinfo2_CFLAGS                = $(AM_CFLAGS) -O -Wno-shadow
+varinfo3_CFLAGS                = $(AM_CFLAGS) -O
+varinfo4_CFLAGS                = $(AM_CFLAGS) -O
+varinfo5_CFLAGS                = $(AM_CFLAGS) -O
+varinfo6_CFLAGS                = $(AM_CFLAGS) -O
+# This requires optimisation in order to get just one resulting error.
+origin4_many_CFLAGS    = $(AM_CFLAGS) -O
+# Apply -O so as to run in reasonable time.
+origin5_bz2_CFLAGS     = $(AM_CFLAGS) -O
+origin6_fp_CFLAGS      = $(AM_CFLAGS) -O
 
 # C++ tests
 mismatches_SOURCES     = mismatches.cpp
@@ -270,7 +259,7 @@ new_nothrow_SOURCES         = new_nothrow.cpp
 new_override_SOURCES   = new_override.cpp
 deep_templates_SOURCES = deep_templates.cpp
 long_namespace_xml_SOURCES = long_namespace_xml.cpp
-deep_templates_CXXFLAGS        = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -gstabs
+deep_templates_CXXFLAGS        = $(AM_CFLAGS) -O -gstabs
 
 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
@@ -279,13 +268,13 @@ else
  # function descriptors.  Unfortunately -Wl,-G -Wl,-bnogc
  # produces a link error on 64-bit AIX, hence only 32-bit
  # gets these flags.
- wrap1_LDFLAGS         = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
- wrap2_LDFLAGS         = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
- wrap3_LDFLAGS         = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
- wrap4_LDFLAGS         = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
- wrap5_LDFLAGS         = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
- wrap6_LDFLAGS         = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
- wrap8_LDFLAGS         = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+ wrap1_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+ wrap2_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+ wrap3_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+ wrap4_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+ wrap5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+ wrap6_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+ wrap8_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
 endif
 endif
 
@@ -309,7 +298,7 @@ endif
 wrap7so_so_SOURCES      = wrap7so.c
 wrap7so_so_LDADD        = 
 wrap7so_so_DEPENDENCIES = 
-wrap7so_so_CFLAGS       = -fpic $(AM_FLAG_M3264_PRI)
+wrap7so_so_CFLAGS       = $(AM_CFLAGS) -fpic
 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
  wrap7so_so_LDFLAGS     = -fpic $(AM_FLAG_M3264_PRI) -shared
 else
@@ -342,7 +331,7 @@ endif
 varinfo5so_so_SOURCES   = varinfo5so.c
 varinfo5so_so_LDADD     = 
 varinfo5so_so_DEPENDENCIES = 
-varinfo5so_so_CFLAGS    = -fpic $(AM_FLAG_M3264_PRI) -g -O
+varinfo5so_so_CFLAGS    = $(AM_CFLAGS) -fpic -O
 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
  varinfo5so_so_LDFLAGS  = -fpic $(AM_FLAG_M3264_PRI) -shared
 else
@@ -355,8 +344,3 @@ else
 endif
 endif
 
-# Valgrind unit self-tests
-#hello_LDFLAGS         = -Wl,-defsym,valt_load_address=0x50000000 \
-#                        -Wl,-T,$(top_builddir)/valt_load_address.lds
-#hello_DEPENDENCIES    = $(top_builddir)/valt_load_address.lds
-
index 3f5fa6431082cdda06cbddd378b6f08005d5a055..4f6ca09b362c821025a9fb2bae8a38eaf8089528 100644 (file)
@@ -1,3 +1,6 @@
+
+include $(top_srcdir)/Makefile.tool-tests.am
+
 noinst_SCRIPTS = filter_stderr
 
 noinst_HEADERS = 
@@ -23,10 +26,9 @@ check_PROGRAMS = bt_everything bug132146 defcfaexpr fxsave-amd64 \
                int3-amd64 \
                more_x87_fp sse_memory xor-undef-amd64
 
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include
-               @FLAG_M64@
-AM_CXXFLAGS = $(AM_CFLAGS)
+AM_CFLAGS   += @FLAG_M64@
+AM_CXXFLAGS += @FLAG_M64@
+AM_CCASFLAGS = @FLAG_M64@
 
 more_x87_fp_CFLAGS     = $(AM_CFLAGS) -O -ffast-math -mfpmath=387 \
                                -mfancy-math-387
diff --git a/memcheck/tests/hello.c b/memcheck/tests/hello.c
deleted file mode 100644 (file)
index 836b36f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-
-#include <stdio.h>
-
-int main(void)
-{
-    fprintf(stderr, "Hello, world!\n");
-    return 0;
-}
-
index 8fde42764109c32f712bb6ee3e06a99ceb7a8fc1..82a9e443800a815df64e5d09674fc1a5405ff119 100644 (file)
@@ -1,3 +1,6 @@
+
+include $(top_srcdir)/Makefile.tool-tests.am
+
 noinst_SCRIPTS = filter_stderr
 
 EXTRA_DIST = $(noinst_SCRIPTS) \
@@ -12,10 +15,5 @@ check_PROGRAMS = \
        stack_switch \
        timerfd-syscall
 
-AM_CPPFLAGS  = -I$(top_srcdir)/include
-AM_CFLAGS    = $(WERROR) $(AM_FLAG_M3264_PRI) -Winline -Wall -Wshadow -g \
-               $(FLAG_MMMX) $(FLAG_MSSE)
-AM_CXXFLAGS  = $(AM_CFLAGS)
-
 stack_switch_LDADD    = -lpthread
 timerfd_syscall_LDADD = -lrt
index de193650183d3d5d0ec7e2f439d4409e01c7d837..21bf84ec636fe090f35e0b2aad9ee341e57bfb65 100644 (file)
@@ -1,8 +1,6 @@
 #include <assert.h>
 #include <stdio.h>
-#if !defined(_AIX)
-# include <sys/syscall.h>
-#endif
+#include <sys/syscall.h>
 #include <sys/types.h>
 #include <unistd.h>
 
@@ -29,9 +27,7 @@ int main(void)
    vals[8] = EOL;
 
    for (i = 0; EOL != vals[i]; i++) {
-#     if !defined(_AIX)
       res = (void*)syscall(__NR_brk, vals[i]);
-#     endif
    }
 
    assert( 0 == brk(orig_ds) );  // libc brk()
index fdec7ceec4b95f6bd8ce929ac17b461e23d886ef..cbaa409cca84cc0cba6bc088badb153276e2124b 100644 (file)
@@ -24,8 +24,6 @@
  *  See also http://www.xmailserver.org/timerfd-test2.c
  */
 
-#if defined(__linux__)
-
 #define _GNU_SOURCE
 
 #include "../../../config.h"
@@ -297,14 +295,3 @@ int main(int ac, char **av)
 
   return 0;
 }
-
-#endif /* __linux__ */
-
-#if defined(_AIX)
-#include <stdio.h>
-int main(int ac, char **av)
-{
-   fprintf(stderr, "This test does not work on AIX5.\n");
-   return 0;
-}
-#endif /* _AIX */
index 1c76f40e37f655c2c861892b47b6e1f269a68e78..3de0c6c792672a21de9c5f5f00b230a60ca74366 100644 (file)
@@ -1,3 +1,6 @@
+
+include $(top_srcdir)/Makefile.tool-tests.am
+
 noinst_SCRIPTS = filter_stderr
 
 noinst_HEADERS = scalar.h
@@ -14,8 +17,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
 check_PROGRAMS = \
        scalar scalar_exit_group scalar_fork scalar_supp scalar_vfork
 
-AM_CPPFLAGS  = -I$(top_srcdir)/include
-AM_CFLAGS    = $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g \
-               $(FLAG_MMMX) $(FLAG_MSSE)
-AM_CXXFLAGS  = $(AM_CFLAGS)
-AM_CCASFLAGS = @FLAG_M32@
+AM_CFLAGS    += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
+AM_CXXFLAGS  += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
+AM_CCASFLAGS  = @FLAG_M32@
+
index d5bbeef3fc33527d53c832177e09b56e7f7716a0..b27ffad8bd80b84c256f8789ba71e34d1f31819e 100644 (file)
@@ -1,3 +1,6 @@
+
+include $(top_srcdir)/Makefile.tool-tests.am
+
 noinst_SCRIPTS = filter_stderr filter_pushfpopf filter_tronical
 
 INSN_TESTS = insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
@@ -34,11 +37,9 @@ check_PROGRAMS = \
        pushpopmem sse_memory tronical \
        more_x86_fp fprem xor-undef-x86
 
-AM_CPPFLAGS  = -I$(top_srcdir)/include
-AM_CFLAGS    = $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g \
-               $(FLAG_MMMX) $(FLAG_MSSE)
-AM_CXXFLAGS  = $(AM_CFLAGS)
-AM_CCASFLAGS = @FLAG_M32@
+AM_CFLAGS    += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
+AM_CXXFLAGS  += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
+AM_CCASFLAGS  = @FLAG_M32@
 
 # must be built with these flags -- bug only occurred with them
 fpeflags_CFLAGS                = $(AM_CFLAGS) -march=i686
index 41d21d901e7eceed73a6d96e201e2586dec9fa73..8957b3339d4e8395209f6756516d4ff9f6fb7395 100644 (file)
@@ -1,6 +1,5 @@
 
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
+include $(top_srcdir)/Makefile.tool-tests.am
 
 SUBDIRS = .
 
@@ -150,18 +149,14 @@ check_PROGRAMS = \
        tls tls.so tls2.so vgprintf \
        coolo_sigaction gxx304
 
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CXXFLAGS = $(AM_CFLAGS)
-
 # Extra stuff for C tests
-ansi_CFLAGS            = $(AM_FLAG_M3264_PRI) -ansi
+ansi_CFLAGS            = $(AM_CFLAGS) -ansi
 floored_LDADD          = -lm
 manythreads_LDADD      = -lpthread
 mq_LDADD               = -lrt
 pth_atfork1_LDADD      = -lpthread
 pth_blockedsig_LDADD   = -lpthread
-pth_cancel1_CFLAGS     = $(AM_FLAG_M3264_PRI) -Wno-shadow
+pth_cancel1_CFLAGS     = $(AM_CFLAGS) -Wno-shadow
 pth_cancel1_LDADD      = -lpthread
 pth_cancel2_LDADD      = -lpthread
 pth_cvsimple_LDADD     = -lpthread
@@ -199,7 +194,7 @@ else
  tls_so_LDFLAGS                = -Wl,-rpath,$(top_builddir)/none/tests -shared -fPIC
  tls_so_LDADD          = tls2.so
 endif
-tls_so_CFLAGS          = $(AM_FLAG_M3264_PRI) -fPIC
+tls_so_CFLAGS          = $(AM_CFLAGS) -fPIC
 tls2_so_SOURCES                = tls2_so.c
 tls2_so_LDFLAGS                = -shared
 
index ce72028d5d910ff2739fe9e4120aab03ef5f6454..b1a5b68fea812dec137c6bf3872d37f9b7636c44 100644 (file)
@@ -1,4 +1,6 @@
 
+include $(top_srcdir)/Makefile.tool-tests.am
+
 noinst_SCRIPTS = filter_cpuid filter_stderr filter_int gen_insn_test.pl
 
 CLEANFILES = $(addsuffix .c,$(INSN_TESTS))
@@ -61,9 +63,9 @@ if BUILD_SSSE3_TESTS
  check_PROGRAMS += ssse3_misaligned
 endif
 
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include
-               @FLAG_M64@
-AM_CXXFLAGS = $(AM_CFLAGS)
+AM_CFLAGS   += @FLAG_M64@
+AM_CXXFLAGS += @FLAG_M64@
+AM_CCASFLAGS = @FLAG_M64@
 
 # generic C ones
 bug132918_LDADD                = -lm
index 2760a8a4f8583a5dae4b2fe8e4816efe722a77f7..eeefe526b8e77798454a49f955483ebc528251da 100644 (file)
@@ -1,3 +1,6 @@
+
+include $(top_srcdir)/Makefile.tool-tests.am
+
 noinst_SCRIPTS = filter_stderr
 
 EXTRA_DIST = $(noinst_SCRIPTS) \
@@ -9,6 +12,3 @@ check_PROGRAMS = \
        mremap \
        mremap2
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-AM_CXXFLAGS = $(AM_CFLAGS)
index f168bb7cf57b7dd9c2776294a5038296aaab8e5c..fe0a3130351b15b0aa46ca9cd94f2553253cb413 100644 (file)
@@ -1,4 +1,6 @@
 
+include $(top_srcdir)/Makefile.tool-tests.am
+
 noinst_SCRIPTS = filter_stderr
 
 EXTRA_DIST = $(noinst_SCRIPTS) \
@@ -27,9 +29,9 @@ check_PROGRAMS = \
        ldstrev lsw jm-insns mftocrf mcrfs round test_fx test_gx \
        testVMX twi tw xlc_dbl_u32
 
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include \
-               @FLAG_M32@
-AM_CXXFLAGS = $(AM_CFLAGS) @FLAG_M32@
+AM_CFLAGS   += @FLAG_M32@
+AM_CXXFLAGS += @FLAG_M32@
+AM_CCASFLAGS = @FLAG_M32@
 
 jm_insns_CFLAGS = -Winline -Wall -O -g -mregnames -maltivec @FLAG_M32@
 testVMX_CFLAGS  = -O -g -Wall -maltivec -mabi=altivec -DALTIVEC \
index c12475e0f57c50eeef3d1a0e4e326224b4c128d1..1f49e4148eac7bea13d988b99563ea5a4e5dd4a2 100644 (file)
@@ -1,4 +1,6 @@
 
+include $(top_srcdir)/Makefile.tool-tests.am
+
 noinst_SCRIPTS = filter_stderr
 
 EXTRA_DIST = $(noinst_SCRIPTS) \
@@ -14,8 +16,8 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
 check_PROGRAMS = \
        jm-insns lsw round std_reg_imm twi_tdi tw_td
 
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include \
-               @FLAG_M64@
-AM_CXXFLAGS = $(AM_CFLAGS) @FLAG_M64@
+AM_CFLAGS   += @FLAG_M64@
+AM_CXXFLAGS += @FLAG_M64@
+AM_CCASFLAGS = @FLAG_M64@
 
 jm_insns_CFLAGS = -Winline -Wall -O -g -mregnames -maltivec @FLAG_M64@
index b57813730cd0db7d4894a61c551f4dac2a016ff3..f018e68f56e7ef64ab2c025e5de71f847460fca8 100644 (file)
@@ -1,3 +1,6 @@
+
+include $(top_srcdir)/Makefile.tool-tests.am
+
 noinst_SCRIPTS = filter_cpuid filter_stderr gen_insn_test.pl
 
 CLEANFILES = $(addsuffix .c,$(INSN_TESTS))
@@ -73,12 +76,11 @@ if BUILD_SSSE3_TESTS
  check_PROGRAMS += ssse3_misaligned
 endif
 
-AM_CFLAGS    = $(WERROR) -Winline -Wall -Wshadow \
-               @FLAG_M32@ -g -I$(top_srcdir)/include \
-               $(FLAG_MMMX) $(FLAG_MSSE)
-AM_CXXFLAGS  = $(AM_CFLAGS)
+AM_CFLAGS   += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
+AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
 AM_CCASFLAGS = @FLAG_M32@
 
+
 # generic C ones
 cpuid_SOURCES          = cpuid_c.c cpuid_s.s
 # fpu_lazy_eflags must use these flags -- the bug only occurred with them
index 24f07699fc3d392bbd76aa54e0f0522728bf1c9d..b9e2e816706b78d55818b9726fdd9282f95ee39c 100644 (file)
@@ -18,13 +18,12 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
 check_PROGRAMS = \
        bigcode bz2 fbench ffbench heap sarp tinycc
 
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g -O $(AM_FLAG_M3264_PRI)
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g -O $(AM_FLAG_M3264_PRI)
 AM_CXXFLAGS = $(AM_CFLAGS)
 
 # Extra stuff
 fbench_CFLAGS   = $(AM_FLAG_M3264_PRI) -g -O2
-fbench_LDADD   = 
 ffbench_LDADD  = -lm
 
 tinycc_CFLAGS  = $(AM_CFLAGS) -Wno-shadow