Somewhat rehash the biarch-build machinery so as to (1) formalise the
distinction between primary and secondary build targets, and (2) make
it independent of the default behaviour of gcc (iow, what gcc does
when you specify neither -m32 nor -m64).

As a result, an out-of-the-box build on ppc64-linux now builds a
system which is basically for 64-bit PowerPC, but also has the ability
to run 32-bit ppc-linux binaries (exactly the same arrangement as you
get when building on amd64-linux).

There are various twists and turns.  multiple-architectures.txt is
updated all the gory details.

This will break amd64 builds until such time as
<tool>/tests/{amd64,x86}/Makefile.am are fixed up (shortly).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5493 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
index 8846c9c..fd2df94 100644
--- a/coregrind/Makefile.am
+++ b/coregrind/Makefile.am
@@ -30,9 +30,24 @@
 noinst_LIBRARIES += libcoregrind_ppc64_linux.a libreplacemalloc_toolpreload_ppc64_linux.a
 endif
 
+#------------------------- launcher -----------------------
+# Build the launcher (valgrind) for the primary target only.
+#
 bin_PROGRAMS = \
 	valgrind
 
+valgrind_SOURCES = \
+	launcher.c \
+	m_debuglog.c
+
+valgrind_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
+valgrind_CFLAGS    = $(AM_CFLAGS_PRI)
+valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
+valgrind_LDFLAGS   = $(AM_CFLAGS_PRI)
+#
+#----------------------------------------------------------
+
+
 noinst_PROGRAMS =
 if VG_X86_LINUX
 noinst_PROGRAMS += vgpreload_core-x86-linux.so
@@ -114,9 +129,6 @@
 BUILT_SOURCES = 
 CLEANFILES = 
 
-valgrind_SOURCES = \
-	launcher.c \
-	m_debuglog.c
 
 COREGRIND_SOURCES_COMMON = \
 	m_commandline.c \