summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-08-19 17:58:17 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-08-19 17:58:17 +0000
commit224fdc8c5b18adbf98056faf0e6a11d3ae6f4775 (patch)
tree316f6f6d479d612242536f5e9672725736ece809 /dev-util/valgrind
parentEAPI 3. added warnings regarding removed commands and incompatibility with pr... (diff)
downloadgentoo-2-224fdc8c5b18adbf98056faf0e6a11d3ae6f4775.tar.gz
gentoo-2-224fdc8c5b18adbf98056faf0e6a11d3ae6f4775.tar.bz2
gentoo-2-224fdc8c5b18adbf98056faf0e6a11d3ae6f4775.zip
Fix building with recent glibc wrt #332871 by Michal Vaner.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/valgrind')
-rw-r--r--dev-util/valgrind/ChangeLog7
-rw-r--r--dev-util/valgrind/files/valgrind-3.5.0-glibc-2.12.patch56
-rw-r--r--dev-util/valgrind/files/valgrind-3.5.0-stat_h.patch50
-rw-r--r--dev-util/valgrind/valgrind-3.5.0.ebuild6
4 files changed, 117 insertions, 2 deletions
diff --git a/dev-util/valgrind/ChangeLog b/dev-util/valgrind/ChangeLog
index 3964b86843b1..a3c939c393e3 100644
--- a/dev-util/valgrind/ChangeLog
+++ b/dev-util/valgrind/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-util/valgrind
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/ChangeLog,v 1.114 2010/05/21 18:59:32 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/ChangeLog,v 1.115 2010/08/19 17:58:17 ssuominen Exp $
+
+ 19 Aug 2010; Samuli Suominen <ssuominen@gentoo.org> valgrind-3.5.0.ebuild,
+ +files/valgrind-3.5.0-glibc-2.12.patch,
+ +files/valgrind-3.5.0-stat_h.patch:
+ Fix building with recent glibc wrt #332871 by Michal Vaner.
21 May 2010; Peter Volkov <pva@gentoo.org> valgrind-3.5.0.ebuild:
amd64 stable, bug 304287
diff --git a/dev-util/valgrind/files/valgrind-3.5.0-glibc-2.12.patch b/dev-util/valgrind/files/valgrind-3.5.0-glibc-2.12.patch
new file mode 100644
index 000000000000..6a02d6bbdb9e
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.5.0-glibc-2.12.patch
@@ -0,0 +1,56 @@
+http://cvs.fedoraproject.org/viewvc/rpms/valgrind/devel/valgrind-3.5.0-glibc-2.12.patch?view=log
+
+--- configure.in
++++ configure.in
+@@ -666,6 +666,16 @@ AC_EGREP_CPP([GLIBC_211], [
+ ],
+ GLIBC_VERSION="2.11")
+
++AC_EGREP_CPP([GLIBC_212], [
++#include <features.h>
++#ifdef __GNU_LIBRARY__
++ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 12)
++ GLIBC_212
++ #endif
++#endif
++],
++GLIBC_VERSION="2.12")
++
+ AC_EGREP_CPP([AIX5_LIBC], [
+ #include <standards.h>
+ #if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
+@@ -759,6 +769,13 @@ case "${GLIBC_VERSION}" in
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
++ 2.12)
++ AC_MSG_RESULT(2.12 family)
++ AC_DEFINE([GLIBC_2_12], 1, [Define to 1 if you're using glibc 2.12.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}"
++ ;;
+ aix5)
+ AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
+ AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3])
+@@ -772,7 +789,7 @@ case "${GLIBC_VERSION}" in
+
+ *)
+ AC_MSG_RESULT(unsupported version)
+- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.11])
++ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.12])
+ AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
+ AC_MSG_ERROR([or Darwin libc])
+ ;;
+--- config.h.in
++++ config.h.in
+@@ -18,6 +18,9 @@
+ /* Define to 1 if you're using glibc 2.11.x */
+ #undef GLIBC_2_11
+
++/* Define to 1 if you're using glibc 2.12.x */
++#undef GLIBC_2_12
++
+ /* Define to 1 if you're using glibc 2.2.x */
+ #undef GLIBC_2_2
+
diff --git a/dev-util/valgrind/files/valgrind-3.5.0-stat_h.patch b/dev-util/valgrind/files/valgrind-3.5.0-stat_h.patch
new file mode 100644
index 000000000000..402676d096ee
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.5.0-stat_h.patch
@@ -0,0 +1,50 @@
+http://cvs.fedoraproject.org/viewvc/rpms/valgrind/devel/valgrind-3.5.0-stat_h.patch?view=log
+
+--- include/vki/vki-amd64-linux.h
++++ include/vki/vki-amd64-linux.h
+@@ -310,6 +310,9 @@ struct vki_stat {
+ long st_blksize;
+ long st_blocks; /* Number 512-byte blocks allocated. */
+
++#undef st_atime
++#undef st_mtime
++#undef st_ctime
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+ unsigned long st_mtime;
+--- include/vki/vki-x86-linux.h
++++ include/vki/vki-x86-linux.h
+@@ -348,6 +348,9 @@ struct vki_stat {
+ unsigned long st_size;
+ unsigned long st_blksize;
+ unsigned long st_blocks;
++#undef st_atime
++#undef st_mtime
++#undef st_ctime
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+ unsigned long st_mtime;
+--- include/vki/vki-ppc32-linux.h
++++ include/vki/vki-ppc32-linux.h
+@@ -392,6 +392,9 @@ struct vki_stat {
+ long st_size;
+ unsigned long st_blksize;
+ unsigned long st_blocks;
++#undef st_atime
++#undef st_mtime
++#undef st_ctime
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+ unsigned long st_mtime;
+--- include/vki/vki-ppc64-linux.h
++++ include/vki/vki-ppc64-linux.h
+@@ -428,6 +428,9 @@ struct vki_stat {
+ long st_size;
+ unsigned long st_blksize;
+ unsigned long st_blocks;
++#undef st_atime
++#undef st_mtime
++#undef st_ctime
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+ unsigned long st_mtime;
diff --git a/dev-util/valgrind/valgrind-3.5.0.ebuild b/dev-util/valgrind/valgrind-3.5.0.ebuild
index 825267e6b1f1..7ae9f17c4790 100644
--- a/dev-util/valgrind/valgrind-3.5.0.ebuild
+++ b/dev-util/valgrind/valgrind-3.5.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.5.0.ebuild,v 1.8 2010/05/21 18:59:32 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.5.0.ebuild,v 1.9 2010/08/19 17:58:17 ssuominen Exp $
inherit autotools eutils flag-o-matic toolchain-funcs
@@ -49,6 +49,10 @@ src_unpack() {
# warning about executable stacks.
epatch "${FILESDIR}/valgrind-3.5.0-non-exec-stack.patch"
+ # Minimal fixes required for glibc-2.12
+ epatch "${FILESDIR}/valgrind-3.5.0-glibc-2.12.patch"
+ epatch "${FILESDIR}/valgrind-3.5.0-stat_h.patch"
+
# Regenerate autotools files
eautoreconf
}