From a6448a30067317677d9d9f5f01e82dbd2aa0e3a4 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Sun, 22 Feb 2009 23:38:10 +0000 Subject: [PATCH] Test files were being passed multiple arch options (eg. "-m32 -m64") when built. This worked fine on the x86/Linux and AMD64/Linux but broke ppc*/Linux. This commit fixes the problem. Thanks to Bart for spotting it. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9222 --- Makefile.tool-tests.am | 7 ++++--- cachegrind/tests/Makefile.am | 3 +++ drd/tests/Makefile.am | 4 +++- exp-ptrcheck/tests/Makefile.am | 3 +++ helgrind/tests/Makefile.am | 2 ++ massif/tests/Makefile.am | 3 +++ memcheck/tests/Makefile.am | 2 ++ none/tests/Makefile.am | 3 +++ 8 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Makefile.tool-tests.am b/Makefile.tool-tests.am index 71192012b0..95c972a8d9 100644 --- a/Makefile.tool-tests.am +++ b/Makefile.tool-tests.am @@ -6,7 +6,8 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \ -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) - +# Nb: Tools need to augment these flags with an arch-selection option, such +# as $(AM_FLAG_M3264_PRI). +AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g +AM_CXXFLAGS = $(WERROR) -Winline -Wall -Wshadow -g diff --git a/cachegrind/tests/Makefile.am b/cachegrind/tests/Makefile.am index d7eee5a039..497ee1977b 100644 --- a/cachegrind/tests/Makefile.am +++ b/cachegrind/tests/Makefile.am @@ -20,6 +20,9 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ check_PROGRAMS = \ chdir clreq dlclose myprint.so +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + # C ones dlclose_LDADD = -ldl myprint_so_LDFLAGS = $(AM_FLAG_M3264_PRI) -shared -fPIC diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index ae1d769bb3..5af780a84d 100644 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -240,7 +240,9 @@ check_PROGRAMS += qt4_mutex qt4_rwlock qt4_semaphore endif -AM_CFLAGS += @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter +AM_CFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter + LDADD = -lpthread diff --git a/exp-ptrcheck/tests/Makefile.am b/exp-ptrcheck/tests/Makefile.am index b7e3b15500..089c95f3b7 100644 --- a/exp-ptrcheck/tests/Makefile.am +++ b/exp-ptrcheck/tests/Makefile.am @@ -75,6 +75,9 @@ check_PROGRAMS = \ stackerr \ strcpy strlen sub supp syscall tricky unaligned xor zero +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + # To make it a bit more realistic, build hackedbz2.c with at # least some optimisation. hackedbz2_CFLAGS = $(AM_CFLAGS) -O diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index 6ffecd8b1c..032f66f8b5 100644 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -155,6 +155,8 @@ if HAVE_PTHREAD_BARRIER check_PROGRAMS += bar_bad bar_trivial endif +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) LDADD = -lpthread diff --git a/massif/tests/Makefile.am b/massif/tests/Makefile.am index 68f4ec95e4..ea0d2c9fcc 100644 --- a/massif/tests/Makefile.am +++ b/massif/tests/Makefile.am @@ -61,6 +61,9 @@ check_PROGRAMS = \ thresholds \ zero +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + # C++ tests new_cpp_SOURCES = new-cpp.cpp overloaded_new_SOURCES = overloaded-new.cpp diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 635ade0622..8d916251bb 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -226,6 +226,8 @@ check_PROGRAMS = \ wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \ writev zeropage +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) # Extra stuff for C tests memcmptest_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcmp diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 8957b3339d..832b7236f7 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -149,6 +149,9 @@ check_PROGRAMS = \ tls tls.so tls2.so vgprintf \ coolo_sigaction gxx304 +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + # Extra stuff for C tests ansi_CFLAGS = $(AM_CFLAGS) -ansi floored_LDADD = -lm -- 2.47.3