|
From: <sv...@va...> - 2009-06-16 01:19:33
|
Author: njn
Date: 2009-06-16 01:29:01 +0100 (Tue, 16 Jun 2009)
New Revision: 10340
Log:
Autotoolised the building of Vex. The hand-written VEX/Makefile is still in
the repository, but when building Valgrind, at configure-time Makefile.vex.am
is used to generate a Makefile that overwrites the hand-written
VEX/Makefile.
Advantages of this:
- If you modify Vex the dependency tracking all just works; no more going
into VEX/ and redoing make first.
- "make install" works immediately, no need for "make" first.
- Parallel builds seem to be working (but I haven't enabled them in the
checkin yet, I want to do more testing).
- No need for hacky Vex-related rules smeared all over the rest of the build
system.
To allow this, I removed the --with-vex option. It would have been possible
but painful to support it, and it's very little use.
Added:
branches/BUILD_TWEAKS/Makefile.vex.am
Modified:
branches/BUILD_TWEAKS/Makefile.all.am
branches/BUILD_TWEAKS/Makefile.am
branches/BUILD_TWEAKS/Makefile.tool-tests.am
branches/BUILD_TWEAKS/Makefile.tool.am
branches/BUILD_TWEAKS/NEWS
branches/BUILD_TWEAKS/README
branches/BUILD_TWEAKS/configure.in
branches/BUILD_TWEAKS/coregrind/Makefile.am
branches/BUILD_TWEAKS/docs/xml/manual-writing-tools.xml
Modified: branches/BUILD_TWEAKS/Makefile.all.am
===================================================================
--- branches/BUILD_TWEAKS/Makefile.all.am 2009-06-15 07:43:50 UTC (rev 10339)
+++ branches/BUILD_TWEAKS/Makefile.all.am 2009-06-16 00:29:01 UTC (rev 10340)
@@ -12,6 +12,7 @@
# The kludge that passes for vex's build system can't handle parallel
# builds. So, for the time being, serialise all Valgrind building.
# (this is equivalent to enforcing "make -j 1".
+# XXX: may not be necessary any more...
.NOTPARALLEL:
#----------------------------------------------------------------------------
@@ -25,7 +26,7 @@
# hook so that every time "make check" is run, we subsequently invoke
# 'dsymutil' on all the executables that lack a .dSYM directory, or that are
# newer than their corresponding .dSYM directory.
-build-noinst_DSYMS:
+build-noinst_DSYMS: $(noinst_DSYMS)
for f in $(noinst_DSYMS); do \
if [ ! -e $$f.dSYM -o $$f -nt $$f.dSYM ] ; then \
echo "dsymutil $$f"; \
@@ -36,7 +37,7 @@
# This is used by coregrind/Makefile.am and Makefile.tool.am for doing
# "in-place" installs. It copies $(noinst_PROGRAMS) into $inplacedir.
# It needs to be depended on by an 'all-local' rule.
-inplace-noinst_PROGRAMS:
+inplace-noinst_PROGRAMS: $(noinst_PROGRAMS)
if [ -n "$(noinst_PROGRAMS)" ] ; then \
mkdir -p $(inplacedir); \
for f in $(noinst_PROGRAMS) ; do \
@@ -58,7 +59,7 @@
# This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing
# "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/.
# It needs to be depended on by an 'install-exec-local' rule.
-install-noinst_PROGRAMS:
+install-noinst_PROGRAMS: $(noinst_PROGRAMS)
if [ -n "$(noinst_PROGRAMS)" ] ; then \
$(mkinstalldirs) $(DESTDIR)$(pkglibdir); \
for f in $(noinst_PROGRAMS); do \
@@ -90,10 +91,16 @@
# Baseline flags for all compilations. Aim here is to maximise
# performance and get whatever useful warnings we can out of gcc.
-AM_CFLAGS_BASE = -O2 -g -Wmissing-prototypes -Wall -Wshadow \
- -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations \
- @FLAG_W_NO_FORMAT_ZERO_LENGTH@ \
- -fno-strict-aliasing
+AM_CFLAGS_BASE = \
+ -O2 -g \
+ -Wall \
+ -Wmissing-prototypes \
+ -Wshadow \
+ -Wpointer-arith \
+ -Wstrict-prototypes \
+ -Wmissing-declarations \
+ @FLAG_W_NO_FORMAT_ZERO_LENGTH@ \
+ -fno-strict-aliasing
# These flags are used for building the preload shared objects.
# The aim is to give reasonable performance but also to have good
@@ -120,20 +127,20 @@
# automake, but this does not really matter and seems hard to avoid.
AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@ = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/include \
- -I@VEX_DIR@/pub \
- -DVGA_@VGCONF_ARCH_PRI@=1 \
- -DVGO_@VGCONF_OS@=1 \
- -DVGP_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/VEX/pub \
+ -DVGA_@VGCONF_ARCH_PRI@=1 \
+ -DVGO_@VGCONF_OS@=1 \
+ -DVGP_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1
if VGCONF_HAVE_PLATFORM_SEC
AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@ = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/include \
- -I@VEX_DIR@/pub \
- -DVGA_@VGCONF_ARCH_SEC@=1 \
- -DVGO_@VGCONF_OS@=1 \
- -DVGP_@VGCONF_ARCH_SEC@_@VGCONF_OS@=1
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/VEX/pub \
+ -DVGA_@VGCONF_ARCH_SEC@=1 \
+ -DVGO_@VGCONF_OS@=1 \
+ -DVGP_@VGCONF_ARCH_SEC@_@VGCONF_OS@=1
endif
AM_FLAG_M3264_X86_LINUX = @FLAG_M32@
Modified: branches/BUILD_TWEAKS/Makefile.am
===================================================================
--- branches/BUILD_TWEAKS/Makefile.am 2009-06-15 07:43:50 UTC (rev 10339)
+++ branches/BUILD_TWEAKS/Makefile.am 2009-06-16 00:29:01 UTC (rev 10340)
@@ -35,6 +35,7 @@
# everything else working before we try it.
SUBDIRS = \
include \
+ VEX \
coregrind \
. \
$(TOOLS) \
@@ -66,8 +67,6 @@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = valgrind.pc
-nodist_pkginclude_HEADERS = $(VEX_PUBLIC_HDRS)
-
BUILT_SOURCES = default.supp valgrind.pc
CLEANFILES = default.supp
@@ -96,7 +95,6 @@
README_PACKAGERS \
README_MISSING_SYSCALL_OR_IOCTL \
valgrind.spec.in valgrind.pc.in \
- $(vex_primary_sources) \
vg-in-place
all-local: default.supp
@@ -107,85 +105,4 @@
clean-local:
rm -rf $(inplacedir)
-# These list the bits of vex we need to install
-VEX_PUBLIC_HDRS = \
- @VEX_DIR@/pub/libvex_guest_amd64.h \
- @VEX_DIR@/pub/libvex_ir.h \
- @VEX_DIR@/pub/libvex_guest_ppc32.h \
- @VEX_DIR@/pub/libvex_guest_ppc64.h \
- @VEX_DIR@/pub/libvex_basictypes.h \
- @VEX_DIR@/pub/libvex_guest_offsets.h \
- @VEX_DIR@/pub/libvex_emwarn.h \
- @VEX_DIR@/pub/libvex.h \
- @VEX_DIR@/pub/libvex_trc_values.h \
- @VEX_DIR@/pub/libvex_guest_arm.h \
- @VEX_DIR@/pub/libvex_guest_x86.h
-
-# These list the bits of vex we need to copy into the tarball
-
-vex_primary_sources = \
- VEX/quote.txt \
- VEX/newline.txt \
- VEX/HACKING.README \
- VEX/LICENSE.README \
- VEX/LICENSE.GPL \
- VEX/Makefile \
- VEX/auxprogs/genoffsets.c \
- VEX/pub/libvex_guest_amd64.h \
- VEX/pub/libvex_ir.h \
- VEX/pub/libvex_guest_ppc32.h \
- VEX/pub/libvex_guest_ppc64.h \
- VEX/pub/libvex_basictypes.h \
- VEX/pub/libvex_guest_offsets.h \
- VEX/pub/libvex_emwarn.h \
- VEX/pub/libvex.h \
- VEX/pub/libvex_trc_values.h \
- VEX/pub/libvex_guest_arm.h \
- VEX/pub/libvex_guest_x86.h \
- VEX/priv/ir/irmatch.c \
- VEX/priv/ir/irmatch.h \
- VEX/priv/ir/irdefs.c \
- VEX/priv/ir/iropt.c \
- VEX/priv/ir/iropt.h \
- VEX/priv/host-ppc/isel.c \
- VEX/priv/host-ppc/hdefs.c \
- VEX/priv/host-ppc/hdefs.h \
- VEX/priv/main/vex_svnversion.h \
- VEX/priv/main/vex_globals.c \
- VEX/priv/main/vex_globals.h \
- VEX/priv/main/vex_main.c \
- VEX/priv/main/vex_util.c \
- VEX/priv/main/vex_util.h \
- VEX/priv/guest-arm/ghelpers.c \
- VEX/priv/guest-arm/gdefs.h \
- VEX/priv/guest-arm/toIR.c \
- VEX/priv/guest-x86/ghelpers.c \
- VEX/priv/guest-x86/gdefs.h \
- VEX/priv/guest-x86/toIR.c \
- VEX/priv/guest-generic/g_generic_x87.c \
- VEX/priv/guest-generic/g_generic_x87.h \
- VEX/priv/guest-generic/bb_to_IR.c \
- VEX/priv/guest-generic/bb_to_IR.h \
- VEX/priv/host-arm/isel.c \
- VEX/priv/host-arm/hdefs.c \
- VEX/priv/host-arm/hdefs.h \
- VEX/priv/host-x86/isel.c \
- VEX/priv/host-x86/hdefs.c \
- VEX/priv/host-x86/hdefs.h \
- VEX/priv/guest-amd64/ghelpers.c \
- VEX/priv/guest-amd64/gdefs.h \
- VEX/priv/guest-amd64/toIR.c \
- VEX/priv/guest-ppc/ghelpers.c \
- VEX/priv/guest-ppc/gdefs.h \
- VEX/priv/guest-ppc/toIR.c \
- VEX/priv/host-generic/reg_alloc2.c \
- VEX/priv/host-generic/h_generic_regs.c \
- VEX/priv/host-generic/h_generic_regs.h \
- VEX/priv/host-generic/h_generic_simd64.c \
- VEX/priv/host-generic/h_generic_simd64.h \
- VEX/priv/host-amd64/isel.c \
- VEX/priv/host-amd64/hdefs.c \
- VEX/priv/host-amd64/hdefs.h
-
-
Modified: branches/BUILD_TWEAKS/Makefile.tool-tests.am
===================================================================
--- branches/BUILD_TWEAKS/Makefile.tool-tests.am 2009-06-15 07:43:50 UTC (rev 10339)
+++ branches/BUILD_TWEAKS/Makefile.tool-tests.am 2009-06-16 00:29:01 UTC (rev 10340)
@@ -4,7 +4,7 @@
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
-I$(top_srcdir)/coregrind -I$(top_builddir)/include \
- -I@VEX_DIR@/pub \
+ -I$(top_srcdir)/VEX/pub \
-DVGA_$(VGCONF_ARCH_PRI)=1 \
-DVGO_$(VGCONF_OS)=1 \
-DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
Modified: branches/BUILD_TWEAKS/Makefile.tool.am
===================================================================
--- branches/BUILD_TWEAKS/Makefile.tool.am 2009-06-15 07:43:50 UTC (rev 10339)
+++ branches/BUILD_TWEAKS/Makefile.tool.am 2009-06-16 00:29:01 UTC (rev 10340)
@@ -9,89 +9,37 @@
COREGRIND_LIBS_X86_LINUX = \
$(top_builddir)/coregrind/libcoregrind-x86-linux.a \
- @VEX_DIR@/libvex-x86-linux.a
+ $(top_builddir)/VEX/libvex-x86-linux.a
COREGRIND_LIBS_AMD64_LINUX = \
$(top_builddir)/coregrind/libcoregrind-amd64-linux.a \
- @VEX_DIR@/libvex-amd64-linux.a
+ $(top_builddir)/VEX/libvex-amd64-linux.a
COREGRIND_LIBS_PPC32_LINUX = \
$(top_builddir)/coregrind/libcoregrind-ppc32-linux.a \
- @VEX_DIR@/libvex-ppc32-linux.a
+ $(top_builddir)/VEX/libvex-ppc32-linux.a
COREGRIND_LIBS_PPC64_LINUX = \
$(top_builddir)/coregrind/libcoregrind-ppc64-linux.a \
- @VEX_DIR@/libvex-ppc64-linux.a
+ $(top_builddir)/VEX/libvex-ppc64-linux.a
COREGRIND_LIBS_PPC32_AIX5 = \
$(top_builddir)/coregrind/libcoregrind-ppc32-aix5.a \
- @VEX_DIR@/libvex-ppc32-aix5.a
+ $(top_builddir)/VEX/libvex-ppc32-aix5.a
COREGRIND_LIBS_PPC64_AIX5 = \
$(top_builddir)/coregrind/libcoregrind-ppc64-aix5.a \
- @VEX_DIR@/libvex-ppc64-aix5.a
+ $(top_builddir)/VEX/libvex-ppc64-aix5.a
COREGRIND_LIBS_X86_DARWIN = \
$(top_builddir)/coregrind/libcoregrind-x86-darwin.a \
- @VEX_DIR@/libvex-x86-darwin.a
+ $(top_builddir)/VEX/libvex-x86-darwin.a
COREGRIND_LIBS_AMD64_DARWIN = \
$(top_builddir)/coregrind/libcoregrind-amd64-darwin.a \
- @VEX_DIR@/libvex-amd64-darwin.a
+ $(top_builddir)/VEX/libvex-amd64-darwin.a
-@VEX_DIR@/libvex-x86-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
- $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
- libvex-x86-linux.a \
- EXTRA_CFLAGS="$(AM_CFLAGS_X86_LINUX) @FLAG_WDECL_AFTER_STMT@ \
- @FLAG_FNO_STACK_PROTECTOR@"
-
-@VEX_DIR@/libvex-amd64-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
- $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
- libvex-amd64-linux.a \
- EXTRA_CFLAGS="$(AM_CFLAGS_AMD64_LINUX) @FLAG_WDECL_AFTER_STMT@ \
- @FLAG_FNO_STACK_PROTECTOR@"
-
-@VEX_DIR@/libvex-ppc32-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
- $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
- libvex-ppc32-linux.a \
- EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_LINUX) @FLAG_WDECL_AFTER_STMT@ \
- @FLAG_FNO_STACK_PROTECTOR@"
-
-@VEX_DIR@/libvex-ppc64-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
- $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
- libvex-ppc64-linux.a \
- EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_LINUX) @FLAG_WDECL_AFTER_STMT@ \
- @FLAG_FNO_STACK_PROTECTOR@"
-
-@VEX_DIR@/libvex-ppc32-aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h
- $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X32" \
- libvex-ppc32-aix5.a \
- EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_AIX5) @FLAG_WDECL_AFTER_STMT@ \
- @FLAG_FNO_STACK_PROTECTOR@"
-
-@VEX_DIR@/libvex-ppc64-aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h
- $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X64" \
- libvex-ppc64-aix5.a \
- EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_AIX5) @FLAG_WDECL_AFTER_STMT@ \
- @FLAG_FNO_STACK_PROTECTOR@"
-
-@VEX_DIR@/libvex-x86-darwin.a: @VEX_DIR@/priv/main/vex_svnversion.h
- $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
- libvex-x86-darwin.a \
- EXTRA_CFLAGS="$(AM_CFLAGS_X86_DARWIN) @FLAG_WDECL_AFTER_STMT@ \
- @FLAG_FNO_STACK_PROTECTOR@"
-
-@VEX_DIR@/libvex-amd64-darwin.a: @VEX_DIR@/priv/main/vex_svnversion.h
- $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
- libvex-amd64-darwin.a \
- EXTRA_CFLAGS="$(AM_CFLAGS_AMD64_DARWIN) @FLAG_WDECL_AFTER_STMT@ \
- @FLAG_FNO_STACK_PROTECTOR@"
-
-@VEX_DIR@/priv/main/vex_svnversion.h:
- $(MAKE) -C @VEX_DIR@ CC="$(CC)" version
-
-
TOOL_LDADD_COMMON = -lgcc
TOOL_LDFLAGS_COMMON_LINUX = -static \
-Wl,-defsym,valt_load_address=@VALT_LOAD_ADDRESS@ \
Added: branches/BUILD_TWEAKS/Makefile.vex.am
===================================================================
--- branches/BUILD_TWEAKS/Makefile.vex.am (rev 0)
+++ branches/BUILD_TWEAKS/Makefile.vex.am 2009-06-16 00:29:01 UTC (rev 10340)
@@ -0,0 +1,208 @@
+# VEX/Makefile is generated from this file at configure-time.
+
+include $(top_srcdir)/Makefile.all.am
+
+#----------------------------------------------------------------------------
+# Headers, etc
+#----------------------------------------------------------------------------
+
+EXTRA_DIST = \
+ HACKING.README \
+ LICENSE.README \
+ LICENSE.GPL \
+ quote.txt \
+ newline.txt \
+ auxprogs/genoffsets.c
+
+pkginclude_HEADERS = \
+ pub/libvex.h \
+ pub/libvex_basictypes.h \
+ pub/libvex_emwarn.h \
+ pub/libvex_guest_x86.h \
+ pub/libvex_guest_amd64.h \
+ pub/libvex_guest_ppc32.h \
+ pub/libvex_guest_ppc64.h \
+ pub/libvex_guest_arm.h \
+ pub/libvex_guest_offsets.h \
+ pub/libvex_ir.h \
+ pub/libvex_trc_values.h
+
+noinst_HEADERS = \
+ priv/main/vex_globals.h \
+ priv/main/vex_util.h \
+ priv/ir/irmatch.h \
+ priv/ir/iropt.h \
+ priv/guest-generic/bb_to_IR.h \
+ priv/guest-generic/g_generic_x87.h \
+ priv/guest-x86/gdefs.h \
+ priv/guest-amd64/gdefs.h \
+ priv/guest-ppc/gdefs.h \
+ priv/guest-arm/gdefs.h \
+ priv/host-generic/h_generic_regs.h \
+ priv/host-generic/h_generic_simd64.h \
+ priv/host-x86/hdefs.h \
+ priv/host-amd64/hdefs.h \
+ priv/host-ppc/hdefs.h \
+ priv/host-arm/hdefs.h
+
+BUILT_SOURCES = \
+ priv/main/vex_svnversion.h \
+ pub/libvex_guest_offsets.h
+CLEANFILES = $(BUILT_SOURCES)
+
+priv/main/vex_svnversion.h:
+ cat quote.txt > priv/main/vex_svnversion.h
+ svnversion -n . >> priv/main/vex_svnversion.h
+ cat quote.txt >> priv/main/vex_svnversion.h
+ cat newline.txt >> priv/main/vex_svnversion.h
+
+# This is very uggerly. Need to sed out both "xyzzyN" and
+# "xyzzy$N" since gcc on different targets emits the constants
+# differently -- with a leading $ on x86/amd64 but none on ppc32/64.
+pub/libvex_guest_offsets.h:
+ rm -f auxprogs/genoffsets.s
+ $(CC) $(LIBVEX_CFLAGS) -O -S -o auxprogs/genoffsets.s \
+ auxprogs/genoffsets.c
+ grep xyzzy auxprogs/genoffsets.s | grep define \
+ | sed "s/xyzzy\\$$//g" | sed "s/xyzzy//g" \
+ > pub/libvex_guest_offsets.h
+ rm -f auxprogs/genoffsets.s
+
+#----------------------------------------------------------------------------
+# libvex-<platform>.a
+#----------------------------------------------------------------------------
+
+pkglib_LIBRARIES = libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
+if VGCONF_HAVE_PLATFORM_SEC
+pkglib_LIBRARIES += libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
+endif
+
+# XXX: automake cannot handle having multiple files of the same name in
+# different directories. The plan is to change the Vex filenames to avoid
+# this. In the meantime, we use some hacky rules to copy the like-named
+# files to differently-named files.
+
+LIBVEX_SOURCES_COMMON = \
+ priv/main/vex_globals.c \
+ priv/main/vex_main.c \
+ priv/main/vex_util.c \
+ priv/ir/irdefs.c \
+ priv/ir/irmatch.c \
+ priv/ir/iropt.c \
+ priv/guest-generic/bb_to_IR.c \
+ priv/guest-generic/g_generic_x87.c \
+ priv/guest-x86/ghelpers-x86.c \
+ priv/guest-x86/toIR-x86.c \
+ priv/guest-amd64/ghelpers-amd64.c \
+ priv/guest-amd64/toIR-amd64.c \
+ priv/guest-ppc/ghelpers-ppc.c \
+ priv/guest-ppc/toIR-ppc.c \
+ priv/guest-arm/ghelpers-arm.c \
+ priv/guest-arm/toIR-arm.c \
+ priv/host-generic/h_generic_regs.c \
+ priv/host-generic/h_generic_simd64.c \
+ priv/host-generic/reg_alloc2.c \
+ priv/host-x86/hdefs-x86.c \
+ priv/host-x86/isel-x86.c \
+ priv/host-amd64/hdefs-amd64.c \
+ priv/host-amd64/isel-amd64.c \
+ priv/host-ppc/hdefs-ppc.c \
+ priv/host-ppc/isel-ppc.c \
+ priv/host-arm/hdefs-arm.c \
+ priv/host-arm/isel-arm.c
+
+# XXX: temporary
+BUILT_SOURCES += \
+ priv/guest-x86/ghelpers-x86.c \
+ priv/guest-amd64/ghelpers-amd64.c \
+ priv/guest-ppc/ghelpers-ppc.c \
+ priv/guest-arm/ghelpers-arm.c \
+ \
+ priv/guest-x86/toIR-x86.c \
+ priv/guest-amd64/toIR-amd64.c \
+ priv/guest-ppc/toIR-ppc.c \
+ priv/guest-arm/toIR-arm.c \
+ \
+ priv/host-x86/hdefs-x86.c \
+ priv/host-amd64/hdefs-amd64.c \
+ priv/host-ppc/hdefs-ppc.c \
+ priv/host-arm/hdefs-arm.c \
+ \
+ priv/host-x86/isel-x86.c \
+ priv/host-amd64/isel-amd64.c \
+ priv/host-ppc/isel-ppc.c \
+ priv/host-arm/isel-arm.c
+
+
+# XXX: ghelpers
+priv/guest-x86/ghelpers-x86.c: priv/guest-x86/ghelpers.c
+ cp priv/guest-x86/ghelpers.c priv/guest-x86/ghelpers-x86.c
+
+priv/guest-amd64/ghelpers-amd64.c: priv/guest-amd64/ghelpers.c
+ cp priv/guest-amd64/ghelpers.c priv/guest-amd64/ghelpers-amd64.c
+
+priv/guest-ppc/ghelpers-ppc.c: priv/guest-ppc/ghelpers.c
+ cp priv/guest-ppc/ghelpers.c priv/guest-ppc/ghelpers-ppc.c
+
+priv/guest-arm/ghelpers-arm.c: priv/guest-arm/ghelpers.c
+ cp priv/guest-arm/ghelpers.c priv/guest-arm/ghelpers-arm.c
+
+# XXX: toIR
+priv/guest-x86/toIR-x86.c: priv/guest-x86/toIR.c
+ cp priv/guest-x86/toIR.c priv/guest-x86/toIR-x86.c
+
+priv/guest-amd64/toIR-amd64.c: priv/guest-amd64/toIR.c
+ cp priv/guest-amd64/toIR.c priv/guest-amd64/toIR-amd64.c
+
+priv/guest-ppc/toIR-ppc.c: priv/guest-ppc/toIR.c
+ cp priv/guest-ppc/toIR.c priv/guest-ppc/toIR-ppc.c
+
+priv/guest-arm/toIR-arm.c: priv/guest-arm/toIR.c
+ cp priv/guest-arm/toIR.c priv/guest-arm/toIR-arm.c
+
+# XXX: hdefs
+priv/host-x86/hdefs-x86.c: priv/host-x86/hdefs.c
+ cp priv/host-x86/hdefs.c priv/host-x86/hdefs-x86.c
+
+priv/host-amd64/hdefs-amd64.c: priv/host-amd64/hdefs.c
+ cp priv/host-amd64/hdefs.c priv/host-amd64/hdefs-amd64.c
+
+priv/host-ppc/hdefs-ppc.c: priv/host-ppc/hdefs.c
+ cp priv/host-ppc/hdefs.c priv/host-ppc/hdefs-ppc.c
+
+priv/host-arm/hdefs-arm.c: priv/host-arm/hdefs.c
+ cp priv/host-arm/hdefs.c priv/host-arm/hdefs-arm.c
+
+# XXX: isel
+priv/host-x86/isel-x86.c: priv/host-x86/isel.c
+ cp priv/host-x86/isel.c priv/host-x86/isel-x86.c
+
+priv/host-amd64/isel-amd64.c: priv/host-amd64/isel.c
+ cp priv/host-amd64/isel.c priv/host-amd64/isel-amd64.c
+
+priv/host-ppc/isel-ppc.c: priv/host-ppc/isel.c
+ cp priv/host-ppc/isel.c priv/host-ppc/isel-ppc.c
+
+priv/host-arm/isel-arm.c: priv/host-arm/isel.c
+ cp priv/host-arm/isel.c priv/host-arm/isel-arm.c
+
+
+LIBVEX_CFLAGS = \
+ -Wbad-function-cast \
+ -Wcast-qual \
+ -Wcast-align \
+ -fstrict-aliasing
+
+libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON)
+libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
+ $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -Ipriv
+libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
+ $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(LIBVEX_CFLAGS)
+if VGCONF_HAVE_PLATFORM_SEC
+libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON)
+libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
+ $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -Ipriv
+libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
+ $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(LIBVEX_CFLAGS)
+endif
+
Modified: branches/BUILD_TWEAKS/NEWS
===================================================================
--- branches/BUILD_TWEAKS/NEWS 2009-06-15 07:43:50 UTC (rev 10339)
+++ branches/BUILD_TWEAKS/NEWS 2009-06-16 00:29:01 UTC (rev 10340)
@@ -62,21 +62,33 @@
gap until the next snapshot. This makes it clear that the memory
usage has not dropped to zero between snapshots.
-* The location of some install files has changed. This should not affect
- most users. Those who might be affected:
- - For people who use Valgrind with MPI programs, the installed
- libmpiwrap.so library has moved from $(INSTALL)/<platform>/libmpiwrap.so
- to $(INSTALL)/libmpiwrap-<platform>.so.
- - For people who distribute standalone Valgrind tools, the installed
- libraries such as $(INSTALL)/<platform>/libcoregrind.a have moved to
- $(INSTALL)/libcoregrind-<platform>.a.
+* Some changes have been made to the build system.
- These changes were made to simplify the build system.
+ - VEX/ is now integrated properly into the build system. This means that
+ dependency tracking within VEX/ now works properly, "make install" will
+ work without requiring "make" before it, and [XXX???] parallel builds
+ (ie. 'make -j') now work (previously a .NOTPARALLEL directive was used
+ to serialize builds, ie. 'make -j' was effectively ignored).
-* Previously, all the distributed suppression (*.supp) files were installed.
- Now, only default.supp is installed. This should not affect users as the
- other installed suppression files were not read.
+ - The --with-vex configure option has been removed. It was of little use
+ and complicated the build system.
+ - The location of some install files has changed. This should not affect
+ most users. Those who might be affected:
+ * For people who use Valgrind with MPI programs, the installed
+ libmpiwrap.so library has moved from $(INSTALL)/<platform>/libmpiwrap.so
+ to $(INSTALL)/libmpiwrap-<platform>.so.
+ * For people who distribute standalone Valgrind tools, the installed
+ libraries such as $(INSTALL)/<platform>/libcoregrind.a have moved to
+ $(INSTALL)/libcoregrind-<platform>.a.
+
+ These changes were made to simplify the build system.
+
+ - Previously, all the distributed suppression (*.supp) files were installed.
+ Now, only default.supp is installed. This should not affect users as the
+ other installed suppression files were not read; the fact that they
+ were installed was a mistake.
+
n-i-bz DRD - race conditions between pthread_barrier_wait() and
pthread_barrier_destroy() calls are now reported.
n-i-bz DRD - added "first observed at" information in error
Modified: branches/BUILD_TWEAKS/README
===================================================================
--- branches/BUILD_TWEAKS/README 2009-06-15 07:43:50 UTC (rev 10339)
+++ branches/BUILD_TWEAKS/README 2009-06-16 00:29:01 UTC (rev 10340)
@@ -87,9 +87,9 @@
options are documented in the INSTALL file. The only interesting
one is the usual --prefix=/where/you/want/it/installed.
- 5. Do "make". (Nb: this cannot be combined with the next step.)
+ 5. Run "make".
- 6. Do "make install", possibly as root if the destination permissions
+ 6. Run "make install", possibly as root if the destination permissions
require that.
7. See if it works. Try "valgrind ls -l". Either this works, or it
Modified: branches/BUILD_TWEAKS/configure.in
===================================================================
--- branches/BUILD_TWEAKS/configure.in 2009-06-15 07:43:50 UTC (rev 10339)
+++ branches/BUILD_TWEAKS/configure.in 2009-06-16 00:29:01 UTC (rev 10340)
@@ -16,43 +16,6 @@
AM_MAINTAINER_MODE
#----------------------------------------------------------------------------
-# Where is VEX ?
-#----------------------------------------------------------------------------
-# Nb: For the 2nd arg, the help string, AS_HELP_STRING is the proper way, but
-# older autoconfs don't support it... here's what it would say:
-#
-# AS_HELP_STRING([--with-vex], [Vex directory]),
-#
-AC_ARG_WITH(vex,
- [ --with-vex=/path/to/vex/dir Vex directory],
-[
- AC_CHECK_FILE($withval/pub/libvex.h,
- [VEX_DIR=$withval],
- [AC_MSG_ERROR([Directory '$withval' does not exist, or does not contain Vex])])
-],
-[
- VEX_DIR='$(top_srcdir)/VEX'
-])
-AC_SUBST(VEX_DIR)
-
-# "make distcheck" first builds a tarball, then extracts it.
-# Then it creates a build directory different from the extracted sources
-# (called _build), and issues
-#
-# ../configure $(DISTCHECK_CONFIGURE_FLAGS)
-#
-# and then builds, runs "make check", installs using DESTDIR, runs make
-# installcheck, uninstalls, checks whether the installed base is empty
-# again, then does yet another "make dist" and compares the resulting
-# tarball with the one it started off with for identical content. Then it
-# tests "make distclean" for no leftover files.
-#
-# So this line means: when doing "make dist", use the same --with-vex value
-# that you used when running configure to configure this tree in the first
-# place.
-AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], [--with-vex=$VEX_DIR])
-
-#----------------------------------------------------------------------------
# Checks for various programs.
#----------------------------------------------------------------------------
CFLAGS="-Wno-long-long"
@@ -1858,8 +1821,10 @@
# Ok. We're done checking.
#----------------------------------------------------------------------------
-AC_OUTPUT(
+# Nb: VEX/Makefile is generated from Makefile.vex.in.
+AC_CONFIG_FILES([
Makefile
+ VEX/Makefile:Makefile.vex.in
valgrind.spec
valgrind.pc
glibc-2.X.supp
@@ -1926,7 +1891,8 @@
drd/docs/Makefile
drd/scripts/download-and-build-splash2
drd/tests/Makefile
-)
+])
+AC_OUTPUT
cat<<EOF
Modified: branches/BUILD_TWEAKS/coregrind/Makefile.am
===================================================================
--- branches/BUILD_TWEAKS/coregrind/Makefile.am 2009-06-15 07:43:50 UTC (rev 10339)
+++ branches/BUILD_TWEAKS/coregrind/Makefile.am 2009-06-16 00:29:01 UTC (rev 10340)
@@ -20,6 +20,11 @@
-DVG_PLATFORM="\"@VGCONF_ARCH_SEC@-@VGCONF_OS@\""
endif
+
+EXTRA_DIST = \
+ m_debuginfo/UNUSED_STABS.txt \
+ m_debuginfo/README.txt
+
#----------------------------------------------------------------------------
# The launcher. Built for the primary target only.
#----------------------------------------------------------------------------
@@ -349,18 +354,6 @@
libcoregrind_ppc32_aix5_a_AR = $(AR) -X32 cru
libcoregrind_ppc64_aix5_a_AR = $(AR) -X64 cru
-
-m_syswrap/syswrap-main.c: libvex_guest_offsets.h
-m_dispatch/dispatch-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S: libvex_guest_offsets.h
-m_syswrap/syscall-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S: libvex_guest_offsets.h
-if VGCONF_HAVE_PLATFORM_SEC
-m_dispatch/dispatch-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S: libvex_guest_offsets.h
-m_syswrap/syscall-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S: libvex_guest_offsets.h
-endif
-
-libvex_guest_offsets.h:
- $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" pub/libvex_guest_offsets.h
-
#----------------------------------------------------------------------------
# libreplacemalloc_toolpreload-<platform>.a
#----------------------------------------------------------------------------
@@ -426,21 +419,6 @@
all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS
clean-local: clean-noinst_DSYMS
- $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" clean
-LIBVEX = libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
-if VGCONF_HAVE_PLATFORM_SEC
-LIBVEX += libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
-endif
-
-# Nb: The loop installs the libvex library for possible use by standalone
-# tools.
install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS
- for v in $(LIBVEX) ; do \
- $(INSTALL_DATA) @VEX_DIR@/$$v $(DESTDIR)$(pkglibdir) ; \
- done
-
-EXTRA_DIST = \
- m_debuginfo/UNUSED_STABS.txt \
- m_debuginfo/README.txt
Modified: branches/BUILD_TWEAKS/docs/xml/manual-writing-tools.xml
===================================================================
--- branches/BUILD_TWEAKS/docs/xml/manual-writing-tools.xml 2009-06-15 07:43:50 UTC (rev 10339)
+++ branches/BUILD_TWEAKS/docs/xml/manual-writing-tools.xml 2009-06-16 00:29:01 UTC (rev 10340)
@@ -140,7 +140,7 @@
<programlisting><![CDATA[
autogen.sh
./configure --prefix=`pwd`/inst
- make # Nb: this cannot be combined with the next step
+ make
make install]]></programlisting>
<para>It should automake, configure and compile without errors,
|