Import valgrind 3.7.0-r4 ebuild.

Valgrind 3.6 doesn't work on our targets because it doesn't support
glibc 2.15. So switch to valgrind 3.7.0.

BUG=none
TEST=by hand

Change-Id: Id7b65f76d79816508439766a386e1186ae175856
Reviewed-on: https://gerrit.chromium.org/gerrit/29005
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
This commit is contained in:
Stéphane Marchesin 2012-08-01 18:53:36 -07:00 committed by Gerrit
parent 4917b39b5c
commit b4453328c4
11 changed files with 212 additions and 222 deletions

View File

@ -1 +1,2 @@
DIST valgrind-3.6.1.tar.bz2 5974836 RMD160 6f78ae50e2fb354547d90bf289abb1f56252043a SHA1 6116ddca2708f56e0a2851bdfbe88e01906fa300 SHA256 49bdcc4fbcf060049b5f0dcfd8a187a6e90e0b0e57309f633b64e44430726a0e DIST valgrind-3.6.1.tar.bz2 5974836 RMD160 6f78ae50e2fb354547d90bf289abb1f56252043a SHA1 6116ddca2708f56e0a2851bdfbe88e01906fa300 SHA256 49bdcc4fbcf060049b5f0dcfd8a187a6e90e0b0e57309f633b64e44430726a0e
DIST valgrind-3.7.0.tar.bz2 6624216 RMD160 6ffbf04a8ff4eb2555d1a6bd87c0656828830761 SHA1 b412f49895bb8a78fc314047119760b5d36e5b5e SHA256 5d62c0330f1481fe2c593249192fa68ff454c19c34343978cc9ce91aa324cbf6

View File

@ -1,49 +0,0 @@
--- valgrind-3.4.1/glibc-2.X.supp.in.jj 2009-03-01 17:04:51.000000000 -0500
+++ valgrind-3.4.1/glibc-2.X.supp.in 2009-05-11 11:17:35.605396000 -0400
@@ -168,9 +168,9 @@
Memcheck:Param
socketcall.sendto(msg)
fun:__sendto_nocancel
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
}
{
glibc24-64bit-padding-1c
@@ -180,7 +180,7 @@
fun:__nscd_get_map_ref
fun:nscd_get*_r
fun:*nscd*
- obj:/*libc-@GLIBC_VERSION@.so
+ obj:/*libc-@GLIBC_VERSION@*.so
}
@@ -199,18 +199,18 @@
Memcheck:Param
socketcall.sendto(msg)
fun:send
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
}
{
X11-64bit-padding-4b
Memcheck:Param
socketcall.send(msg)
fun:send
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
}
##----------------------------------------------------------------------##

View File

@ -1,11 +0,0 @@
--- configure.in 2011-06-09 16:33:14.000000000 -0400
+++ configure.in.orig 2011-06-09 16:33:08.000000000 -0400
@@ -220,7 +220,7 @@
kernel=`uname -r`
case "${kernel}" in
- 2.6.*)
+ 2.6.*|3.*)
AC_MSG_RESULT([2.6 family (${kernel})])
AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
;;

View File

@ -1,89 +0,0 @@
--- configure.in.orig 2011-02-17 14:29:14.000000000 -0500
+++ configure.in 2011-02-17 15:05:46.000000000 -0500
@@ -1692,7 +1692,8 @@
# NEEDED BY THE REGRESSION TEST PROGRAMS.
-# The test below verifies whether the QtCore package been installed.
+# The test below first checks if the user has manaually disabled
+# QtCore. It then verifies whether the QtCore package been installed.
# This test works as follows:
# - If pkg-config was not installed at the time autogen.sh was run,
# the definition of the PKG_CHECK_EXISTS() macro will not be found by
@@ -1709,37 +1710,49 @@
# the pkg-config executable is not present on the system on which the
# configure script is run.
-ifdef(
- [PKG_CHECK_EXISTS],
- [PKG_CHECK_EXISTS(
- [QtCore],
+AC_ARG_ENABLE(qtcore,
+ AS_HELP_STRING(--enable-qtcore, compile with qtcore support),
[
- PKG_CHECK_MODULES([QTCORE], [QtCore])
- # Paranoia: don't trust the result reported by pkg-config, but when
- # pkg-config reports that QtCore has been found, verify whether linking
- # programs with QtCore succeeds.
- AC_LANG(C++)
- safe_CXXFLAGS="${CXXFLAGS}"
- CXXFLAGS="${QTCORE_CFLAGS} ${QTCORE_LIBS} $mflag_primary"
- AC_TRY_LINK(
- [#include <QMutex>],
- [QMutex Mutex;],
- [ac_have_qtcore=yes],
- [
- AC_MSG_WARN([Although pkg-config detected Qt4, linking Qt4 programs fails. Skipping Qt4.])
- ac_have_qtcore=no
- ]
- )
- CXXFLAGS="${safe_CXXFLAGS}"
+ if test x$enableval = xno ; then
+ AC_MSG_CHECKING([for QTCORE ])
+ AC_MSG_RESULT([QTCORE is manually distabled.])
+ [ac_have_qtcore=no]
+ fi
],
[
- ac_have_qtcore=no
+ ifdef(
+ [PKG_CHECK_EXISTS],
+ [PKG_CHECK_EXISTS(
+ [QtCore],
+ [
+ PKG_CHECK_MODULES([QTCORE], [QtCore])
+ # Paranoia: don't trust the result reported by pkg-config, but when
+ # pkg-config reports that QtCore has been found, verify whether linking
+ # programs with QtCore succeeds.
+ AC_LANG(C++)
+ safe_CXXFLAGS="${CXXFLAGS}"
+ CXXFLAGS="${QTCORE_CFLAGS} ${QTCORE_LIBS} $mflag_primary"
+ AC_TRY_LINK(
+ [#include <QMutex>],
+ [QMutex Mutex;],
+ [ac_have_qtcore=yes],
+ [
+ AC_MSG_WARN([Although pkg-config detected Qt4, linking Qt4 programs fails. Skipping Qt4.])
+ ac_have_qtcore=no
+ ]
+ )
+ CXXFLAGS="${safe_CXXFLAGS}"
+ ],
+ [
+ ac_have_qtcore=no
+ ]
+ )
+ ],
+ AC_MSG_WARN([pkg-config has not been installed or is too old.])
+ AC_MSG_WARN([Detection of Qt4 will be skipped.])
+ [ac_have_qtcore=no]
+ )
]
- )
- ],
- AC_MSG_WARN([pkg-config has not been installed or is too old.])
- AC_MSG_WARN([Detection of Qt4 will be skipped.])
- [ac_have_qtcore=no]
)
AM_CONDITIONAL([HAVE_QTCORE], [test x$ac_have_qtcore = xyes])

View File

@ -0,0 +1,37 @@
From: Gregorio Guidi <gregorio.guidi@gmail.com>
Retain the old behavior of the build system even with automake 1.11.2.
Reported-by: Oleg Bulatov <dmage@bk.ru>
X-Gentoo-Bug: 397429
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=397429
X-KDE-Bug: 290719
X-KDE-Bug-URL: https://bugs.kde.org/show_bug.cgi?id=290719
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
diff -Nur valgrind-3.7.0.orig/coregrind/Makefile.am valgrind-3.7.0/coregrind/Makefile.am
--- valgrind-3.7.0.orig/coregrind/Makefile.am 2011-10-27 12:55:06.000000000 +0200
+++ valgrind-3.7.0/coregrind/Makefile.am 2012-01-06 17:23:48.717115986 +0100
@@ -495,7 +495,8 @@
m_gdbserver/powerpc-altivec64l.xml
# so as to make sure these get copied into the install tree
-pkglib_DATA = $(GDBSERVER_XML_FILES)
+vgdatadir = $(pkglibdir)
+vgdata_DATA = $(GDBSERVER_XML_FILES)
# so as to make sure these get copied into the tarball
EXTRA_DIST += $(GDBSERVER_XML_FILES)
diff -Nur valgrind-3.7.0.orig/Makefile.am valgrind-3.7.0/Makefile.am
--- valgrind-3.7.0.orig/Makefile.am 2011-10-26 23:24:45.000000000 +0200
+++ valgrind-3.7.0/Makefile.am 2012-01-06 17:23:17.445114847 +0100
@@ -61,7 +61,8 @@
# default.supp, as it is built from the base .supp files at compile-time.
dist_noinst_DATA = $(SUPP_FILES)
-pkglib_DATA = default.supp
+vgdatadir = $(pkglibdir)
+vgdata_DATA = default.supp
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = valgrind.pc

View File

@ -0,0 +1,35 @@
Index: configure.in
===================================================================
--- configure.in (revision 12273)
+++ configure.in (revision 12274)
@@ -98,18 +98,21 @@
# We don't want gcc < 3.0
AC_MSG_CHECKING([for a supported version of gcc])
-# Try to get the gcc version, sed-ing out some unexpected stuff
-# that appears with the default gcc on OSX 10.6 and 10.7 respectively.
-# Without this, the version number comes out as 686, 10 or 11 :-(
+# Obtain the compiler version.
#
-# i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
-# i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
+# A few examples of how the ${CC} --version output looks like:
#
+# Arch Linux: i686-pc-linux-gnu-gcc (GCC) 4.6.2
+# Debian Linux: gcc (Debian 4.3.2-1.1) 4.3.2
+# openSUSE: gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]
+# Exherbo Linux: x86_64-pc-linux-gnu-gcc (Exherbo gcc-4.6.2) 4.6.2
+# OS/X 10.6: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
+# OS/X 10.7: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
+# Clang: clang version 2.9 (tags/RELEASE_29/final)
+#
[gcc_version=`${CC} --version \
- | head -n 1 \
- | $SED 's/i686-apple-darwin10//' \
- | $SED 's/i686-apple-darwin11//' \
- | $SED 's/^[^0-9]*\([0-9.]*\).*$/\1/'`]
+ | $SED -n -e 's/[^ ]*gcc[^ ]* ([^)]*) \([0-9.]*\).*$/\1/p' \
+ -e 's/[^ ]*clang version \([0-9.]*\).*$/\1/p'`]
is_clang="notclang"
if test "x`${CC} --version | head -n 1 | $SED 's/\(clang\) version.*/\1/'`" = "xclang" ; then

View File

@ -0,0 +1,12 @@
diff -Naur valgrind-3.7.0.orig//Makefile.all.am valgrind-3.7.0/Makefile.all.am
--- valgrind-3.7.0.orig//Makefile.all.am 2011-10-26 17:24:45.000000000 -0400
+++ valgrind-3.7.0/Makefile.all.am 2011-11-10 16:18:18.000000000 -0500
@@ -82,7 +82,7 @@
# performance and get whatever useful warnings we can out of gcc.
# -fno-builtin is important for defeating LLVM's idiom recognition
# that somehow causes VG_(memset) to get into infinite recursion.
-AM_CFLAGS_BASE = \
+AM_CFLAGS_BASE = -fno-stack-protector \
-O2 -g \
-Wall \
-Wmissing-prototypes \

View File

@ -0,0 +1,26 @@
diff -Naur valgrind-3.7.0.orig//configure.in valgrind-3.7.0/configure.in
--- valgrind-3.7.0.orig//configure.in 2012-01-14 17:49:13.000000000 -0500
+++ valgrind-3.7.0/configure.in 2012-01-14 18:13:45.000000000 -0500
@@ -778,6 +778,13 @@
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
+ 2.15)
+ AC_MSG_RESULT(2.15 family)
+ AC_DEFINE([GLIBC_2_15], 1, [Define to 1 if you're using glibc 2.15.x])
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
darwin)
AC_MSG_RESULT(Darwin)
AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
@@ -791,7 +798,7 @@
*)
AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.14])
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.15])
AC_MSG_ERROR([or Darwin libc])
;;
esac

View File

@ -1,7 +1,7 @@
diff -ruN valgrind-3.6.0.orig/coregrind/Makefile.am valgrind-3.6.0/coregrind/Makefile.am diff -Naur valgrind-3.7.0.orig//coregrind/Makefile.am valgrind-3.7.0/coregrind/Makefile.am
--- valgrind-3.6.0.orig/coregrind/Makefile.am 2010-10-21 04:19:45.000000000 +0800 --- valgrind-3.7.0.orig//coregrind/Makefile.am 2011-11-10 20:02:47.000000000 -0500
+++ valgrind-3.6.0/coregrind/Makefile.am 2010-10-24 20:39:42.655001876 +0800 +++ valgrind-3.7.0/coregrind/Makefile.am 2011-11-10 20:03:00.000000000 -0500
@@ -285,23 +285,12 @@ @@ -292,14 +292,6 @@
m_demangle/demangle.c \ m_demangle/demangle.c \
m_demangle/dyn-string.c \ m_demangle/dyn-string.c \
m_demangle/safe-ctype.c \ m_demangle/safe-ctype.c \
@ -10,13 +10,13 @@ diff -ruN valgrind-3.6.0.orig/coregrind/Makefile.am valgrind-3.6.0/coregrind/Mak
- m_dispatch/dispatch-ppc32-linux.S \ - m_dispatch/dispatch-ppc32-linux.S \
- m_dispatch/dispatch-ppc64-linux.S \ - m_dispatch/dispatch-ppc64-linux.S \
- m_dispatch/dispatch-arm-linux.S \ - m_dispatch/dispatch-arm-linux.S \
- m_dispatch/dispatch-ppc32-aix5.S \ - m_dispatch/dispatch-s390x-linux.S \
- m_dispatch/dispatch-ppc64-aix5.S \
- m_dispatch/dispatch-x86-darwin.S \ - m_dispatch/dispatch-x86-darwin.S \
- m_dispatch/dispatch-amd64-darwin.S \ - m_dispatch/dispatch-amd64-darwin.S \
m_initimg/initimg-linux.c \ m_gdbserver/m_gdbserver.c \
m_initimg/initimg-aix5.c \ m_gdbserver/inferiors.c \
m_initimg/initimg-darwin.c \ m_gdbserver/m_gdbserver.c \
@@ -322,8 +314,6 @@
m_initimg/initimg-pathscan.c \ m_initimg/initimg-pathscan.c \
m_mach/mach_basics.c \ m_mach/mach_basics.c \
m_mach/mach_msg.c \ m_mach/mach_msg.c \
@ -25,8 +25,8 @@ diff -ruN valgrind-3.6.0.orig/coregrind/Makefile.am valgrind-3.6.0/coregrind/Mak
m_replacemalloc/replacemalloc_core.c \ m_replacemalloc/replacemalloc_core.c \
m_scheduler/scheduler.c \ m_scheduler/scheduler.c \
m_scheduler/sema.c \ m_scheduler/sema.c \
@@ -314,15 +303,6 @@ @@ -335,14 +325,6 @@
m_sigframe/sigframe-ppc64-aix5.c \ m_sigframe/sigframe-s390x-linux.c \
m_sigframe/sigframe-x86-darwin.c \ m_sigframe/sigframe-x86-darwin.c \
m_sigframe/sigframe-amd64-darwin.c \ m_sigframe/sigframe-amd64-darwin.c \
- m_syswrap/syscall-x86-linux.S \ - m_syswrap/syscall-x86-linux.S \
@ -34,14 +34,13 @@ diff -ruN valgrind-3.6.0.orig/coregrind/Makefile.am valgrind-3.6.0/coregrind/Mak
- m_syswrap/syscall-ppc32-linux.S \ - m_syswrap/syscall-ppc32-linux.S \
- m_syswrap/syscall-ppc64-linux.S \ - m_syswrap/syscall-ppc64-linux.S \
- m_syswrap/syscall-arm-linux.S \ - m_syswrap/syscall-arm-linux.S \
- m_syswrap/syscall-ppc32-aix5.S \ - m_syswrap/syscall-s390x-linux.S \
- m_syswrap/syscall-ppc64-aix5.S \
- m_syswrap/syscall-x86-darwin.S \ - m_syswrap/syscall-x86-darwin.S \
- m_syswrap/syscall-amd64-darwin.S \ - m_syswrap/syscall-amd64-darwin.S \
m_syswrap/syswrap-main.c \ m_syswrap/syswrap-main.c \
m_syswrap/syswrap-generic.c \ m_syswrap/syswrap-generic.c \
m_syswrap/syswrap-linux.c \ m_syswrap/syswrap-linux.c \
@@ -343,6 +323,24 @@ @@ -361,6 +343,29 @@
m_ume/main.c \ m_ume/main.c \
m_ume/script.c m_ume/script.c
@ -57,19 +56,24 @@ diff -ruN valgrind-3.6.0.orig/coregrind/Makefile.am valgrind-3.6.0/coregrind/Mak
+ +
+if VGCONF_OS_IS_DARWIN +if VGCONF_OS_IS_DARWIN
+COREGRIND_SOURCES_COMMON += \ +COREGRIND_SOURCES_COMMON += \
+ m_start-@VGCONF_ARCH_PRI@-darwin.S \ + m_dispatch/dispatch-@VGCONF_ARCH_PRI@-darwin.S \
+ m_start-@VGCONF_ARCH_SEC@-darwin.S \ + m_syswrap/syscall-@VGCONF_ARCH_PRI@-darwin.S \
+ m_mach/mach_traps-@VGCONF_ARCH_PRI@-darwin.S \ + m_mach/mach_traps-@VGCONF_ARCH_PRI@-darwin.S
+if VGCONF_HAVE_PLATFORM_SEC
+COREGRIND_SOURCES_COMMON += \
+ m_dispatch/dispatch-@VGCONF_ARCH_SEC@-darwin.S \
+ m_syswrap/syscall-@VGCONF_ARCH_SEC@-darwin.S \
+ m_mach/mach_traps-@VGCONF_ARCH_SEC@-darwin.S + m_mach/mach_traps-@VGCONF_ARCH_SEC@-darwin.S
+endif +endif
+endif
+ +
libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \ libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
$(COREGRIND_SOURCES_COMMON) $(COREGRIND_SOURCES_COMMON)
nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \ nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
diff -ruN valgrind-3.6.0.orig/coregrind/m_dispatch/dispatch-amd64-linux.S valgrind-3.6.0/coregrind/m_dispatch/dispatch-amd64-linux.S diff -Naur valgrind-3.7.0.orig//coregrind/m_dispatch/dispatch-amd64-linux.S valgrind-3.7.0/coregrind/m_dispatch/dispatch-amd64-linux.S
--- valgrind-3.6.0.orig/coregrind/m_dispatch/dispatch-amd64-linux.S 2010-10-21 04:19:39.000000000 +0800 --- valgrind-3.7.0.orig//coregrind/m_dispatch/dispatch-amd64-linux.S 2011-10-26 17:24:42.000000000 -0400
+++ valgrind-3.6.0/coregrind/m_dispatch/dispatch-amd64-linux.S 2010-10-24 20:39:41.462001899 +0800 +++ valgrind-3.7.0/coregrind/m_dispatch/dispatch-amd64-linux.S 2011-11-10 20:07:40.000000000 -0500
@@ -338,11 +338,11 @@ @@ -349,11 +349,11 @@
ret ret
.size VG_(run_a_noredir_translation), .-VG_(run_a_noredir_translation) .size VG_(run_a_noredir_translation), .-VG_(run_a_noredir_translation)
@ -83,15 +87,16 @@ diff -ruN valgrind-3.6.0.orig/coregrind/m_dispatch/dispatch-amd64-linux.S valgri
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
/*--- end ---*/ /*--- end ---*/
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
diff -ruN valgrind-3.6.0.orig/coregrind/m_dispatch/dispatch-x86-linux.S valgrind-3.6.0/coregrind/m_dispatch/dispatch-x86-linux.S diff -Naur valgrind-3.7.0.orig//coregrind/m_dispatch/dispatch-x86-linux.S valgrind-3.7.0/coregrind/m_dispatch/dispatch-x86-linux.S
--- valgrind-3.6.0.orig/coregrind/m_dispatch/dispatch-x86-linux.S 2010-10-21 04:19:39.000000000 +0800 --- valgrind-3.7.0.orig//coregrind/m_dispatch/dispatch-x86-linux.S 2011-10-26 17:24:42.000000000 -0400
+++ valgrind-3.6.0/coregrind/m_dispatch/dispatch-x86-linux.S 2010-10-24 20:39:41.022001883 +0800 +++ valgrind-3.7.0/coregrind/m_dispatch/dispatch-x86-linux.S 2011-11-10 20:04:07.000000000 -0500
@@ -304,12 +304,11 @@ @@ -320,12 +320,11 @@
ret ret
.size VG_(run_a_noredir_translation), .-VG_(run_a_noredir_translation) .size VG_(run_a_noredir_translation), .-VG_(run_a_noredir_translation)
-
+#endif // defined(VGP_x86_linux) +#endif // defined(VGP_x86_linux)
+
/* Let the linker know we don't need an executable stack */ /* Let the linker know we don't need an executable stack */
.section .note.GNU-stack,"",@progbits .section .note.GNU-stack,"",@progbits
@ -100,9 +105,9 @@ diff -ruN valgrind-3.6.0.orig/coregrind/m_dispatch/dispatch-x86-linux.S valgrind
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
/*--- end ---*/ /*--- end ---*/
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
diff -ruN valgrind-3.6.0.orig/coregrind/m_syswrap/syscall-amd64-linux.S valgrind-3.6.0/coregrind/m_syswrap/syscall-amd64-linux.S diff -Naur valgrind-3.7.0.orig//coregrind/m_syswrap/syscall-amd64-linux.S valgrind-3.7.0/coregrind/m_syswrap/syscall-amd64-linux.S
--- valgrind-3.6.0.orig/coregrind/m_syswrap/syscall-amd64-linux.S 2010-10-21 04:19:41.000000000 +0800 --- valgrind-3.7.0.orig//coregrind/m_syswrap/syscall-amd64-linux.S 2011-11-10 20:02:47.000000000 -0500
+++ valgrind-3.6.0/coregrind/m_syswrap/syscall-amd64-linux.S 2010-10-24 20:39:40.576001879 +0800 +++ valgrind-3.7.0/coregrind/m_syswrap/syscall-amd64-linux.S 2011-11-10 20:03:00.000000000 -0500
@@ -205,11 +205,11 @@ @@ -205,11 +205,11 @@
ML_(blksys_finished): .quad 5b ML_(blksys_finished): .quad 5b
.previous .previous
@ -117,21 +122,22 @@ diff -ruN valgrind-3.6.0.orig/coregrind/m_syswrap/syscall-amd64-linux.S valgrind
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
/*--- end ---*/ /*--- end ---*/
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
diff -ruN valgrind-3.6.0.orig/coregrind/m_syswrap/syscall-x86-linux.S valgrind-3.6.0/coregrind/m_syswrap/syscall-x86-linux.S diff -Naur valgrind-3.7.0.orig//coregrind/m_syswrap/syscall-x86-linux.S valgrind-3.7.0/coregrind/m_syswrap/syscall-x86-linux.S
--- valgrind-3.6.0.orig/coregrind/m_syswrap/syscall-x86-linux.S 2010-10-21 04:19:41.000000000 +0800 --- valgrind-3.7.0.orig//coregrind/m_syswrap/syscall-x86-linux.S 2011-11-10 20:02:47.000000000 -0500
+++ valgrind-3.6.0/coregrind/m_syswrap/syscall-x86-linux.S 2010-10-24 20:39:40.152001876 +0800 +++ valgrind-3.7.0/coregrind/m_syswrap/syscall-x86-linux.S 2011-11-10 20:03:00.000000000 -0500
@@ -164,12 +164,12 @@ @@ -164,12 +164,12 @@
ML_(blksys_committed): .long 4b ML_(blksys_committed): .long 4b
ML_(blksys_finished): .long 5b ML_(blksys_finished): .long 5b
.previous .previous
+
+#endif // defined(VGP_x86_linux)
/* Let the linker know we don't need an executable stack */
.section .note.GNU-stack,"",@progbits
-#endif // defined(VGP_x86_linux)
- -
-/* Let the linker know we don't need an executable stack */
-.section .note.GNU-stack,"",@progbits
#endif // defined(VGP_x86_linux)
+/* Let the linker know we don't need an executable stack */
+.section .note.GNU-stack,"",@progbits
+
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
/*--- end ---*/ /*--- end ---*/
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/

View File

@ -0,0 +1,13 @@
diff -Naur valgrind-3.7.0.orig//mpi/Makefile.am valgrind-3.7.0/mpi/Makefile.am
--- valgrind-3.7.0.orig//mpi/Makefile.am 2011-10-26 17:24:23.000000000 -0400
+++ valgrind-3.7.0/mpi/Makefile.am 2011-11-10 16:03:14.000000000 -0500
@@ -7,9 +7,6 @@
CC = $(MPI_CC)
DEFS =
DEFAULT_INCLUDES =
-CPPFLAGS =
-CFLAGS =
-LDFLAGS =
EXTRA_DIST = \
mpiwrap_type_test.c

View File

@ -1,8 +1,8 @@
# Copyright 1999-2011 Gentoo Foundation # Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.6.1-r1.ebuild,v 1.4 2011/12/21 15:47:15 josejx Exp $ # $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.7.0-r4.ebuild,v 1.2 2012/05/10 09:21:33 grobian Exp $
EAPI=2 EAPI="4"
inherit autotools eutils flag-o-matic toolchain-funcs multilib pax-utils inherit autotools eutils flag-o-matic toolchain-funcs multilib pax-utils
DESCRIPTION="An open-source memory debugger for GNU/Linux" DESCRIPTION="An open-source memory debugger for GNU/Linux"
@ -11,41 +11,40 @@ SRC_URI="http://www.valgrind.org/downloads/${P}.tar.bz2"
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
KEYWORDS="-* amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux" KEYWORDS="-* amd64 arm ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x64-macos"
IUSE="mpi qt4" IUSE="mpi"
DEPEND="mpi? ( virtual/mpi )" DEPEND="mpi? ( virtual/mpi )"
RDEPEND="${DEPEND}" RDEPEND="${DEPEND}"
src_prepare() { src_prepare() {
# Correct hard coded doc location
sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
# Don't force multiarch stuff on OSX, bug #306467
sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
# Respect CFLAGS, LDFLAGS # Respect CFLAGS, LDFLAGS
sed -i -e '/^CPPFLAGS =/d' -e '/^CFLAGS =/d' -e '/^LDFLAGS =/d' \ epatch "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
mpi/Makefile.am || die
# Changing Makefile.all.am to disable SSP # Changing Makefile.all.am to disable SSP
sed -i -e 's:^AM_CFLAGS_BASE = :AM_CFLAGS_BASE = -fno-stack-protector :' \ epatch "${FILESDIR}"/${PN}-3.7.0-fno-stack-protector.patch
Makefile.all.am || die
# Correct hard coded doc location
sed -i -e "s:doc/valgrind:doc/${PF}:" \
docs/Makefile.am || die
# Yet more local labels, this time for ppc32 & ppc64 # Yet more local labels, this time for ppc32 & ppc64
epatch "${FILESDIR}"/${PN}-3.6.0-local-labels.patch epatch "${FILESDIR}"/${PN}-3.6.0-local-labels.patch
# Don't build in empty assembly files for other platforms or we'll get a QA # Don't build in empty assembly files for other platforms or we'll get a QA
# warning about executable stacks. # warning about executable stacks.
epatch "${FILESDIR}"/${PN}-3.6.0-non-exec-stack.patch epatch "${FILESDIR}"/${PN}-3.7.0-non-exec-stack-v2.patch
# Fix up some suppressions that were not general enough for glibc versions # Fix the regex to get gcc's version
# with more than just a major and minor number. epatch "${FILESDIR}"/${PN}-3.7.0-fix-gcc-regex.patch
epatch "${FILESDIR}"/${PN}-3.4.1-glibc-2.10.1.patch
# Remove automagic dependency on qt4 # Fix stricter use of dir variables, bug #397429
epatch "${FILESDIR}"/${PN}-3.6.1-user-enable-qt4.patch epatch "${FILESDIR}"/${PN}-3.7.0-automake-1.11.2.patch
# Allow valgrind to build against linux-3, bug #370857 # Fix for glibc 2.15, bug #398921
epatch "${FILESDIR}"/${PN}-3.6.1-linux-3.patch epatch "${FILESDIR}"/${PN}-3.7.0-glibc-2.15.patch
# Regenerate autotools files # Regenerate autotools files
eautoreconf eautoreconf
@ -60,41 +59,51 @@ src_configure() {
# amd64 (bug #102157) # amd64 (bug #102157)
# -fstack-protector more undefined references to __guard and __stack_smash_handler # -fstack-protector more undefined references to __guard and __stack_smash_handler
# because valgrind doesn't link to glibc (bug #114347) # because valgrind doesn't link to glibc (bug #114347)
# -m64 -mx32 for multilib-portage, bug #398825
# -ggdb3 segmentation fault on startup # -ggdb3 segmentation fault on startup
filter-flags -fomit-frame-pointer filter-flags -fomit-frame-pointer
filter-flags -fpie filter-flags -fpie
filter-flags -fstack-protector filter-flags -fstack-protector
filter-flags -m64 -mx32
replace-flags -ggdb3 -ggdb2 replace-flags -ggdb3 -ggdb2
if use amd64 || use ppc64; then if use amd64 || use ppc64; then
! has_multilib_profile && myconf="${myconf} --enable-only64bit" ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
fi fi
# Force bitness on darwin, bug #306467
use x86-macos && myconf="${myconf} --enable-only32bit"
use x64-macos && myconf="${myconf} --enable-only64bit"
# Don't use mpicc unless the user asked for it (bug #258832) # Don't use mpicc unless the user asked for it (bug #258832)
if ! use mpi; then if ! use mpi; then
myconf="${myconf} --without-mpicc" myconf="${myconf} --without-mpicc"
fi fi
if ! use qt4; then
myconf="${myconf} --disable-qtcore"
fi
econf ${myconf} econf ${myconf}
} }
src_install() { src_install() {
emake DESTDIR="${D}" install || die emake DESTDIR="${D}" install
dodoc AUTHORS FAQ.txt NEWS README* dodoc AUTHORS FAQ.txt NEWS README*
pax-mark m "${D}"/usr/$(get_libdir)/valgrind/*-*-linux pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_names on shared libraries, can't turn them into bundles,
# as dyld won't load them any more then, bug #306467
local l
for l in "${ED}"/usr/lib/valgrind/*.so ; do
install_name_tool -id "${EPREFIX}"/usr/lib/valgrind/${l##*/} "${l}"
done
fi
} }
pkg_postinst() { pkg_postinst() {
if use ppc || use ppc64 || use amd64 ; then ewarn "Valgrind will not work if glibc does not have debug symbols."
ewarn "Valgrind will not work on ppc, ppc64 or amd64 if glibc does not have" ewarn "To fix this you can add splitdebug to FEATURES in make.conf"
ewarn "debug symbols (see https://bugs.gentoo.org/show_bug.cgi?id=214065" ewarn "and remerge glibc. See:"
ewarn "and http://bugs.gentoo.org/show_bug.cgi?id=274771)." ewarn "https://bugs.gentoo.org/show_bug.cgi?id=214065"
ewarn "To fix this you can add splitdebug to FEATURES in make.conf and" ewarn "https://bugs.gentoo.org/show_bug.cgi?id=274771"
ewarn "remerge glibc." ewarn "https://bugs.gentoo.org/show_bug.cgi?id=388703"
fi
} }