Various build system clean-ups and simplifications:

- 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
This commit is contained in:
Nicholas Nethercote 2009-02-19 09:52:05 +00:00
parent 4ddcff03b9
commit c8d150dbaa
63 changed files with 162 additions and 458 deletions

12
Makefile.tool-tests.am Normal file
View File

@ -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)

View 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

View 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

View 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

View 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

View 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

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: hg01_all_ok
prog: ../../helgrind/tests/hg01_all_ok

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: hg02_deadlock
prog: ../../helgrind/tests/hg02_deadlock

View File

@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --show-confl-seg=no --var-info=yes
prog: hg03_inherit
prog: ../../helgrind/tests/hg03_inherit

View File

@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --var-info=yes
prog: hg04_race
prog: ../../helgrind/tests/hg04_race

View File

@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --var-info=yes --check-stack-var=yes
prog: hg05_race2
prog: ../../helgrind/tests/hg05_race2

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: hg06_readshared
prog: ../../helgrind/tests/hg06_readshared

View 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

View 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

View 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

View File

@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --var-info=yes
prog: rwlock_race
prog: ../../helgrind/tests/rwlock_race

View File

@ -1 +1,4 @@
valgrind: ./rwlock_vgtest: No such file or directory
Finished.
ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

View File

@ -1 +1 @@
prog: rwlock_vgtest
prog: ../../helgrind/tests/rwlock_test

View File

@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --var-info=yes
prog: tc01_simple_race
prog: ../../helgrind/tests/tc01_simple_race

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc02_simple_tls
prog: ../../helgrind/tests/tc02_simple_tls

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc03_re_excl
prog: ../../helgrind/tests/tc03_re_excl

View File

@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --check-stack-var=yes
prog: tc04_free_lock
prog: ../../helgrind/tests/tc04_free_lock

View File

@ -1,3 +1,3 @@
prereq: ./supported_libpthread
prog: tc05_simple_race
prog: ../../helgrind/tests/tc05_simple_race
stderr_filter: filter_error_summary

View File

@ -1,3 +1,3 @@
prereq: ./supported_libpthread
prog: tc06_two_races
prog: ../../helgrind/tests/tc06_two_races
stderr_filter: filter_error_summary

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc07_hbl1
prog: ../../helgrind/tests/tc07_hbl1

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc08_hbl2
prog: ../../helgrind/tests/tc08_hbl2

View File

@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --check-stack-var=yes
prog: tc09_bad_unlock
prog: ../../helgrind/tests/tc09_bad_unlock

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc10_rec_lock
prog: ../../helgrind/tests/tc10_rec_lock

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc11_XCHG
prog: ../../helgrind/tests/tc11_XCHG

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc12_rwl_trivial
prog: ../../helgrind/tests/tc12_rwl_trivial

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc13_laog1
prog: ../../helgrind/tests/tc13_laog1

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc15_laog_lockdel
prog: ../../helgrind/tests/tc15_laog_lockdel

View File

@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --var-info=yes
prog: tc16_byterace
prog: ../../helgrind/tests/tc16_byterace

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc17_sembar
prog: ../../helgrind/tests/tc17_sembar

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc18_semabuse
prog: ../../helgrind/tests/tc18_semabuse

View 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

View 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

View 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

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc21_pthonce
prog: ../../helgrind/tests/tc21_pthonce

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc22_exit_w_lock
prog: ../../helgrind/tests/tc22_exit_w_lock

View File

@ -1,2 +1,2 @@
prereq: ./supported_libpthread
prog: tc23_bogus_condwait
prog: ../../helgrind/tests/tc23_bogus_condwait

View File

@ -1,3 +1,3 @@
prereq: ./supported_libpthread
prog: tc24_nonzero_sem
prog: ../../helgrind/tests/tc24_nonzero_sem
vgopts: --hg-sanity-flags=111111

View 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

View 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

View 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 \

View 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

View 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

View File

@ -1,9 +0,0 @@
#include <stdio.h>
int main(void)
{
fprintf(stderr, "Hello, world!\n");
return 0;
}

View 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

View 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()

View 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 */

View 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@

View 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

View 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

View 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

View 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)

View 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 \

View 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@

View 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

View 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