Skip to content

Commit

Permalink
- Merge with 3.8.0 upstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
stass committed Aug 15, 2012
2 parents b46c665 + 2b9cb7c commit 0955c31
Show file tree
Hide file tree
Showing 1,104 changed files with 176,292 additions and 26,196 deletions.
14 changes: 11 additions & 3 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Julian Seward was the original founder, designer and author of
Valgrind, created the dynamic translation frameworks, wrote Memcheck,
the 3.X versions of Helgrind, Ptrcheck, DHAT, and did lots of other
the 3.X versions of Helgrind, SGCheck, DHAT, and did lots of other
things.

Nicholas Nethercote did the core/tool generalisation, wrote
Expand Down Expand Up @@ -65,8 +65,16 @@ Philippe Waroquiers wrote and maintains the embedded GDB server. He
also made a bunch of performance and memory-reduction fixes across
diverse parts of the system.

Maynard Johnson contributed IBM Power6 and Power7 support, and generally
deals with ppc64-linux issues.
Carl Love and Maynard Johnson contributed IBM Power6 and Power7
support, and generally deal with ppc{32,64}-linux issues.

Petar Jovanovic and Dejan Jevtic wrote and maintain the mips32-linux
port.

Dragos Tatulea modified the arm-android port so it also works on
x86-android.

Jakub Jelinek helped out with the AVX support.

Many, many people sent bug reports, patches, and helpful feedback.

Expand Down
48 changes: 26 additions & 22 deletions Makefile.all.am
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,6 @@ endif
#
# Nb: the AM_CPPFLAGS_* values are suitable for building tools and auxprogs.
# For building the core, coregrind/Makefile.am files add some extra things.
#
# Also: in newer versions of automake (1.10 onwards?) asm files ending with
# '.S' are considered "pre-processed" (as opposed to those ending in '.s')
# and so the CPPFLAGS are passed to the assembler. But this is not true for
# older automakes (e.g. 1.8.5, 1.9.6), sigh. So we include
# AM_CPPFLAGS_<PLATFORM> in each AM_CCASFLAGS_<PLATFORM> variable. This
# means some of the flags are duplicated on systems with newer versions of
# automake, but this does not really matter and seems hard to avoid.

AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@ = \
-I$(top_srcdir) \
Expand All @@ -141,22 +133,22 @@ AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@ = \
endif

AM_FLAG_M3264_X86_LINUX = @FLAG_M32@
AM_CFLAGS_X86_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \
$(AM_CFLAGS_BASE)
AM_CCASFLAGS_X86_LINUX = $(AM_CPPFLAGS_X86_LINUX) @FLAG_M32@ -g
AM_CFLAGS_X86_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \
$(AM_CFLAGS_BASE) -fomit-frame-pointer
AM_CCASFLAGS_X86_LINUX = @FLAG_M32@ -g

AM_FLAG_M3264_AMD64_LINUX = @FLAG_M64@
AM_CFLAGS_AMD64_LINUX = @FLAG_M64@ -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ $(AM_CFLAGS_BASE)
AM_CCASFLAGS_AMD64_LINUX = $(AM_CPPFLAGS_AMD64_LINUX) @FLAG_M64@ -g
AM_CFLAGS_AMD64_LINUX = @FLAG_M64@ @PREFERRED_STACK_BOUNDARY@ \
$(AM_CFLAGS_BASE) -fomit-frame-pointer
AM_CCASFLAGS_AMD64_LINUX = @FLAG_M64@ -g

AM_FLAG_M3264_PPC32_LINUX = @FLAG_M32@
AM_CFLAGS_PPC32_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE)
AM_CCASFLAGS_PPC32_LINUX = $(AM_CPPFLAGS_PPC32_LINUX) @FLAG_M32@ -g
AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g

AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@
AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE)
AM_CCASFLAGS_PPC64_LINUX = $(AM_CPPFLAGS_PPC64_LINUX) @FLAG_M64@ -g
AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g

AM_FLAG_M3264_X86_FREEBSD = @FLAG_M32@
AM_CFLAGS_X86_FREEBSD = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \
Expand All @@ -166,7 +158,7 @@ AM_CCASFLAGS_X86_FREEBSD = $(AM_CPPFLAGS_X86_FREEBSD) @FLAG_M32@ -g
AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@
AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \
$(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8
AM_CCASFLAGS_ARM_LINUX = $(AM_CPPFLAGS_ARM_LINUX) @FLAG_M32@ \
AM_CCASFLAGS_ARM_LINUX = @FLAG_M32@ \
-marm -mcpu=cortex-a8 -g

AM_FLAG_M3264_AMD64_FREEBSD = @FLAG_M64@
Expand All @@ -180,17 +172,21 @@ AM_CFLAGS_X86_DARWIN = $(WERROR) -arch i386 $(AM_CFLAGS_BASE) \
-mmacosx-version-min=10.5 \
-fno-stack-protector -fno-pic -fno-PIC

AM_CCASFLAGS_X86_DARWIN = $(AM_CPPFLAGS_X86_DARWIN) -arch i386 -g
AM_CCASFLAGS_X86_DARWIN = -arch i386 -g

AM_FLAG_M3264_AMD64_DARWIN = -arch x86_64
AM_CFLAGS_AMD64_DARWIN = $(WERROR) -arch x86_64 $(AM_CFLAGS_BASE) \
-mmacosx-version-min=10.5 -fno-stack-protector
AM_CCASFLAGS_AMD64_DARWIN = $(AM_CPPFLAGS_AMD64_DARWIN) -arch x86_64 -g
AM_CCASFLAGS_AMD64_DARWIN = -arch x86_64 -g

AM_FLAG_M3264_S390X_LINUX = @FLAG_M64@
AM_CFLAGS_S390X_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE)
AM_CCASFLAGS_S390X_LINUX = $(AM_CPPFLAGS_S390X_LINUX) -mzarch -march=z900 \
@FLAG_M64@ -g
AM_CFLAGS_S390X_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) -fomit-frame-pointer
AM_CCASFLAGS_S390X_LINUX = @FLAG_M64@ -g -mzarch -march=z900

AM_FLAG_M3264_MIPS32_LINUX = @FLAG_M32@
AM_CFLAGS_MIPS32_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) -mips32
AM_CCASFLAGS_MIPS32_LINUX = @FLAG_M32@ -mips32 -g


# Flags for the primary target. These must be used to build the
# regtests and performance tests. In fact, these must be used to
Expand All @@ -214,6 +210,13 @@ PRELOAD_LDFLAGS_COMMON_LINUX = -nodefaultlibs -shared -Wl,-z,interpose,-z,initf
PRELOAD_LDFLAGS_COMMON_FREEBSD = -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst
PRELOAD_LDFLAGS_COMMON_DARWIN = -dynamic -dynamiclib -all_load

if VGCONF_PLATVARIANT_IS_ANDROID
# The Android toolchain includes all kinds of stdlib helpers present in
# bionic which is bad because we are not linking with it and the Android
# linker will panic.
PRELOAD_LDFLAGS_COMMON_LINUX += -nostdlib
endif

PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
Expand All @@ -224,4 +227,5 @@ PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386
PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64
PRELOAD_LDFLAGS_S390X_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
PRELOAD_LDFLAGS_MIPS32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@

32 changes: 15 additions & 17 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

AUTOMAKE_OPTIONS = foreign 1.7 dist-bzip2
AUTOMAKE_OPTIONS = foreign 1.10 dist-bzip2

include $(top_srcdir)/Makefile.all.am

Expand All @@ -16,16 +16,6 @@ EXP_TOOLS = exp-sgcheck \
exp-bbv \
exp-dhat

# DDD: once all tools work on Darwin, TEST_TOOLS and TEST_EXP_TOOLS can be
# replaced with TOOLS and EXP_TOOLS.
TEST_TOOLS = $(TOOLS)
if !VGCONF_OS_IS_DARWIN
TEST_EXP_TOOLS = $(EXP_TOOLS)
else
TEST_EXP_TOOLS = exp-bbv
endif


# Put docs last because building the HTML is slow and we want to get
# everything else working before we try it.
SUBDIRS = \
Expand Down Expand Up @@ -54,15 +44,16 @@ SUPP_FILES = \
darwin9.supp darwin9-drd.supp \
freebsd.supp \
darwin10.supp darwin10-drd.supp \
darwin11.supp \
darwin11.supp darwin12.supp \
bionic.supp
DEFAULT_SUPP_FILES = @DEFAULT_SUPP@

# We include all the base .supp files in the distribution, but not
# default.supp, as it is built from the base .supp files at compile-time.
dist_noinst_DATA = $(SUPP_FILES)

pkglib_DATA = default.supp
vglibdir = $(pkglibdir)
vglib_DATA = default.supp

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = valgrind.pc
Expand All @@ -76,14 +67,19 @@ default.supp: $(DEFAULT_SUPP_FILES)
cat $(DEFAULT_SUPP_FILES) >> default.supp

## Preprend @PERL@ because tests/vg_regtest isn't executable
## Ensure make exits with error if PERL fails or check_makefile_consistency fails.
regtest: check
-tests/check_makefile_consistency gdbserver_tests $(TEST_TOOLS) $(TEST_EXP_TOOLS)
gdbserver_tests/make_local_links $(GDB)
@PERL@ tests/vg_regtest gdbserver_tests $(TEST_TOOLS) $(TEST_EXP_TOOLS)
if @PERL@ tests/vg_regtest gdbserver_tests $(TOOLS) $(EXP_TOOLS) ; then \
tests/check_makefile_consistency gdbserver_tests $(TOOLS) $(EXP_TOOLS); \
else \
tests/check_makefile_consistency gdbserver_tests $(TOOLS) $(EXP_TOOLS); \
false; \
fi
nonexp-regtest: check
@PERL@ tests/vg_regtest $(TEST_TOOLS)
@PERL@ tests/vg_regtest $(TOOLS)
exp-regtest: check
@PERL@ tests/vg_regtest gdbserver_tests $(TEST_EXP_TOOLS)
@PERL@ tests/vg_regtest gdbserver_tests $(EXP_TOOLS)
# Nb: gdbserver_tests are put in exp-regtest rather than nonexp-regtest
# because they are tested with various valgrind tools, so might be using
# an experimental tool.
Expand All @@ -104,6 +100,8 @@ EXTRA_DIST = \
README_MISSING_SYSCALL_OR_IOCTL \
README.s390 \
README.android \
README.mips \
NEWS.old \
valgrind.pc.in \
valgrind.spec.in \
valgrind.spec
Expand Down
6 changes: 6 additions & 0 deletions Makefile.tool-tests.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
-DVGO_@VGCONF_OS@=1 \
-DVGP_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1 \
-DVGPV_@VGCONF_ARCH_PRI@_@VGCONF_OS@_@VGCONF_PLATVARIANT@=1

if VGCONF_HAVE_PLATFORM_SEC
AM_CPPFLAGS += -DVGA_SEC_@VGCONF_ARCH_SEC@=1 \
-DVGP_SEC_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1
endif

# Nb: Tools need to augment these flags with an arch-selection option, such
# as $(AM_FLAG_M3264_PRI).
AM_CFLAGS = -Winline -Wall -Wshadow -g
Expand Down
12 changes: 12 additions & 0 deletions Makefile.tool.am
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ TOOL_LDFLAGS_X86_DARWIN = \
TOOL_LDFLAGS_AMD64_DARWIN = \
$(TOOL_LDFLAGS_COMMON_DARWIN) -arch x86_64

# MIPS Linux default start symbol is __start, not _start like on x86 or amd
TOOL_LDFLAGS_MIPS32_LINUX = \
-static -nodefaultlibs -nostartfiles -u __start @FLAG_NO_BUILD_ID@ \
@FLAG_M32@

# On Android we must ask for non-executable stack, not sure why.
if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
if VGCONF_PLATVARIANT_IS_ANDROID
Expand Down Expand Up @@ -116,6 +121,8 @@ LIBREPLACEMALLOC_AMD64_DARWIN = \
LIBREPLACEMALLOC_S390X_LINUX = \
$(top_builddir)/coregrind/libreplacemalloc_toolpreload-s390x-linux.a

LIBREPLACEMALLOC_MIPS32_LINUX = \
$(top_builddir)/coregrind/libreplacemalloc_toolpreload-mips32-linux.a

LIBREPLACEMALLOC_LDFLAGS_X86_LINUX = \
-Wl,--whole-archive \
Expand Down Expand Up @@ -162,6 +169,11 @@ LIBREPLACEMALLOC_LDFLAGS_S390X_LINUX = \
$(LIBREPLACEMALLOC_S390X_LINUX) \
-Wl,--no-whole-archive

LIBREPLACEMALLOC_LDFLAGS_MIPS32_LINUX = \
-Wl,--whole-archive \
$(LIBREPLACEMALLOC_MIPS32_LINUX) \
-Wl,--no-whole-archive

#----------------------------------------------------------------------------
# General stuff
#----------------------------------------------------------------------------
Expand Down
16 changes: 12 additions & 4 deletions Makefile.vex.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pkginclude_HEADERS = \
pub/libvex_guest_ppc64.h \
pub/libvex_guest_arm.h \
pub/libvex_guest_s390x.h \
pub/libvex_guest_mips32.h \
pub/libvex_s390x_common.h \
pub/libvex_ir.h \
pub/libvex_trc_values.h
Expand All @@ -41,6 +42,7 @@ noinst_HEADERS = \
priv/guest_ppc_defs.h \
priv/guest_arm_defs.h \
priv/guest_s390_defs.h \
priv/guest_mips_defs.h \
priv/host_generic_regs.h \
priv/host_generic_simd64.h \
priv/host_generic_simd128.h \
Expand All @@ -49,7 +51,8 @@ noinst_HEADERS = \
priv/host_ppc_defs.h \
priv/host_arm_defs.h \
priv/host_s390_defs.h \
priv/host_s390_disasm.h
priv/host_s390_disasm.h \
priv/host_mips_defs.h

BUILT_SOURCES = pub/libvex_guest_offsets.h
CLEANFILES = pub/libvex_guest_offsets.h
Expand All @@ -64,14 +67,15 @@ pub/libvex_guest_offsets.h: auxprogs/genoffsets.c \
pub/libvex_guest_ppc32.h \
pub/libvex_guest_ppc64.h \
pub/libvex_guest_arm.h \
pub/libvex_guest_s390x.h
pub/libvex_guest_s390x.h \
pub/libvex_guest_mips32.h
rm -f auxprogs/genoffsets.s
$(CC) $(CFLAGS) \
$(LIBVEX_CFLAGS) \
$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
-O -S -o auxprogs/genoffsets.s \
auxprogs/genoffsets.c
grep xyzzy auxprogs/genoffsets.s | grep define \
grep xyzzy auxprogs/genoffsets.s | grep "^#define" \
| sed "s/xyzzy\\$$//g" \
| sed "s/xyzzy#//g" \
| sed "s/xyzzy//g" \
Expand Down Expand Up @@ -106,6 +110,8 @@ LIBVEX_SOURCES_COMMON = \
priv/guest_arm_toIR.c \
priv/guest_s390_helpers.c \
priv/guest_s390_toIR.c \
priv/guest_mips_helpers.c \
priv/guest_mips_toIR.c \
priv/host_generic_regs.c \
priv/host_generic_simd64.c \
priv/host_generic_simd128.c \
Expand All @@ -120,7 +126,9 @@ LIBVEX_SOURCES_COMMON = \
priv/host_arm_isel.c \
priv/host_s390_defs.c \
priv/host_s390_isel.c \
priv/host_s390_disasm.c
priv/host_s390_disasm.c \
priv/host_mips_defs.c \
priv/host_mips_isel.c

LIBVEX_CFLAGS = \
-Wbad-function-cast \
Expand Down
Loading

0 comments on commit 0955c31

Please sign in to comment.