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 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/Makefile.tool-tests.am b/Makefile.tool-tests.am
index 7119201..95c972a 100644
--- a/Makefile.tool-tests.am
+++ b/Makefile.tool-tests.am
@@ -6,7 +6,8 @@
-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 d7eee5a..497ee19 100644
--- a/cachegrind/tests/Makefile.am
+++ b/cachegrind/tests/Makefile.am
@@ -20,6 +20,9 @@
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 ae1d769..5af780a 100644
--- a/drd/tests/Makefile.am
+++ b/drd/tests/Makefile.am
@@ -240,7 +240,9 @@
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 b7e3b15..089c95f 100644
--- a/exp-ptrcheck/tests/Makefile.am
+++ b/exp-ptrcheck/tests/Makefile.am
@@ -75,6 +75,9 @@
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 6ffecd8..032f66f 100644
--- a/helgrind/tests/Makefile.am
+++ b/helgrind/tests/Makefile.am
@@ -155,6 +155,8 @@
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 68f4ec9..ea0d2c9 100644
--- a/massif/tests/Makefile.am
+++ b/massif/tests/Makefile.am
@@ -61,6 +61,9 @@
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 635ade0..8d91625 100644
--- a/memcheck/tests/Makefile.am
+++ b/memcheck/tests/Makefile.am
@@ -226,6 +226,8 @@
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 8957b33..832b723 100644
--- a/none/tests/Makefile.am
+++ b/none/tests/Makefile.am
@@ -149,6 +149,9 @@
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