diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-01-27 04:51:32 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-01-27 04:51:32 +0000 |
commit | dc512c36861afadef9ccf3e513dd1406b8a0cc56 (patch) | |
tree | 9e5c06dcedcb386a7c71a5c7cde99dfa636014ab /dev-util/valgrind | |
parent | Version bump via perl-bump experimental tool. (diff) | |
download | gentoo-2-dc512c36861afadef9ccf3e513dd1406b8a0cc56.tar.gz gentoo-2-dc512c36861afadef9ccf3e513dd1406b8a0cc56.tar.bz2 gentoo-2-dc512c36861afadef9ccf3e513dd1406b8a0cc56.zip |
Fix compability with recent glibc release.
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/valgrind')
-rw-r--r-- | dev-util/valgrind/ChangeLog | 9 | ||||
-rw-r--r-- | dev-util/valgrind/files/valgrind-3.6.0-glibc-2.13.patch | 56 | ||||
-rw-r--r-- | dev-util/valgrind/files/valgrind-3.6.0-strcasecmp.patch | 116 | ||||
-rw-r--r-- | dev-util/valgrind/valgrind-3.6.0.ebuild | 14 |
4 files changed, 188 insertions, 7 deletions
diff --git a/dev-util/valgrind/ChangeLog b/dev-util/valgrind/ChangeLog index 22c4bb90946e..423ec28b61e2 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.118 2010/11/10 01:40:41 blueness Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/ChangeLog,v 1.119 2011/01/27 04:51:32 ssuominen Exp $ + + 27 Jan 2011; Samuli Suominen <ssuominen@gentoo.org> valgrind-3.6.0.ebuild, + +files/valgrind-3.6.0-glibc-2.13.patch, + +files/valgrind-3.6.0-strcasecmp.patch: + Fix compability with recent glibc release. *valgrind-3.6.0 (10 Nov 2010) diff --git a/dev-util/valgrind/files/valgrind-3.6.0-glibc-2.13.patch b/dev-util/valgrind/files/valgrind-3.6.0-glibc-2.13.patch new file mode 100644 index 000000000000..efe75b495a79 --- /dev/null +++ b/dev-util/valgrind/files/valgrind-3.6.0-glibc-2.13.patch @@ -0,0 +1,56 @@ +http://pkgs.fedoraproject.org/gitweb/?p=valgrind.git;a=summary + +--- valgrind/configure.in ++++ valgrind/configure.in +@@ -649,6 +649,16 @@ _ACEOF + GLIBC_VERSION="`$CPP conftest.$ac_ext | $SED -n 's/^glibc version is: //p' | $SED 's/ /./g'`" + fi + ++AC_EGREP_CPP([GLIBC_213], [ ++#include <features.h> ++#ifdef __GNU_LIBRARY__ ++ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 13) ++ GLIBC_213 ++ #endif ++#endif ++], ++GLIBC_VERSION="2.13") ++ + AC_EGREP_CPP([AIX5_LIBC], [ + #include <standards.h> + #if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530) +@@ -749,6 +759,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.13) ++ AC_MSG_RESULT(2.13 family) ++ AC_DEFINE([GLIBC_2_13], 1, [Define to 1 if you're using glibc 2.13.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]) +@@ -762,7 +779,7 @@ case "${GLIBC_VERSION}" in + + *) + AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}]) +- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.12]) ++ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.13]) + AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION]) + AC_MSG_ERROR([or Darwin libc]) + ;; +--- valgrind/config.h.in ++++ valgrind/config.h.in +@@ -33,6 +33,9 @@ + /* Define to 1 if you're using glibc 2.12.x */ + #undef GLIBC_2_12 + ++/* Define to 1 if you're using glibc 2.13.x */ ++#undef GLIBC_2_13 ++ + /* Define to 1 if you're using glibc 2.2.x */ + #undef GLIBC_2_2 + diff --git a/dev-util/valgrind/files/valgrind-3.6.0-strcasecmp.patch b/dev-util/valgrind/files/valgrind-3.6.0-strcasecmp.patch new file mode 100644 index 000000000000..c406dfbaaad4 --- /dev/null +++ b/dev-util/valgrind/files/valgrind-3.6.0-strcasecmp.patch @@ -0,0 +1,116 @@ +http://pkgs.fedoraproject.org/gitweb/?p=valgrind.git;a=summary + +--- valgrind/memcheck/mc_replace_strmem.c ++++ valgrind/memcheck/mc_replace_strmem.c +@@ -431,6 +430,111 @@ STRCMP(VG_Z_LD64_SO_1, strcmp + #endif + + ++#if defined(VGO_linux) ++extern int tolower (int); ++ ++#define STRCASECMP(soname, fnname) \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2 ); \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2 ) \ ++ { \ ++ register unsigned char c1; \ ++ register unsigned char c2; \ ++ while (True) { \ ++ c1 = tolower(*(unsigned char *)s1); \ ++ c2 = tolower(*(unsigned char *)s2); \ ++ if (c1 != c2) break; \ ++ if (c1 == 0) break; \ ++ s1++; s2++; \ ++ } \ ++ if (c1 < c2) return -1; \ ++ if (c1 > c2) return 1; \ ++ return 0; \ ++ } ++ ++STRCASECMP(VG_Z_LIBC_SONAME, strcasecmp) ++STRCASECMP(VG_Z_LIBC_SONAME, __GI_strcasecmp) ++ ++ ++#define STRNCASECMP(soname, fnname) \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, SizeT nmax ); \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, SizeT nmax ) \ ++ { \ ++ register unsigned char c1; \ ++ register unsigned char c2; \ ++ SizeT n = 0; \ ++ while (True) { \ ++ if (n >= nmax) return 0; \ ++ if (*s1 == 0 && *s2 == 0) return 0; \ ++ if (*s1 == 0) return -1; \ ++ if (*s2 == 0) return 1; \ ++ c1 = tolower(*(unsigned char*)s1); \ ++ c2 = tolower(*(unsigned char*)s2); \ ++ if (c1 < c2) return -1; \ ++ if (c1 > c2) return 1; \ ++ s1++; s2++; n++; \ ++ } \ ++ } ++ ++STRNCASECMP(VG_Z_LIBC_SONAME, strncasecmp) ++STRNCASECMP(VG_Z_LIBC_SONAME, __GI_strncasecmp) ++ ++extern int tolower_l (int, void *) __attribute__((weak)); ++ ++#define STRCASECMP_L(soname, fnname) \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, void* l ); \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, void* l ) \ ++ { \ ++ register unsigned char c1; \ ++ register unsigned char c2; \ ++ while (True) { \ ++ c1 = tolower_l(*(unsigned char *)s1, l); \ ++ c2 = tolower_l(*(unsigned char *)s2, l); \ ++ if (c1 != c2) break; \ ++ if (c1 == 0) break; \ ++ s1++; s2++; \ ++ } \ ++ if (c1 < c2) return -1; \ ++ if (c1 > c2) return 1; \ ++ return 0; \ ++ } ++ ++STRCASECMP_L(VG_Z_LIBC_SONAME, strcasecmp_l) ++STRCASECMP_L(VG_Z_LIBC_SONAME, __GI_strcasecmp_l) ++ ++ ++#define STRNCASECMP_L(soname, fnname) \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, SizeT nmax, void* l ); \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, SizeT nmax, void* l ) \ ++ { \ ++ register unsigned char c1; \ ++ register unsigned char c2; \ ++ SizeT n = 0; \ ++ while (True) { \ ++ if (n >= nmax) return 0; \ ++ if (*s1 == 0 && *s2 == 0) return 0; \ ++ if (*s1 == 0) return -1; \ ++ if (*s2 == 0) return 1; \ ++ c1 = tolower_l(*(unsigned char*)s1, l); \ ++ c2 = tolower_l(*(unsigned char*)s2, l); \ ++ if (c1 < c2) return -1; \ ++ if (c1 > c2) return 1; \ ++ s1++; s2++; n++; \ ++ } \ ++ } ++ ++STRNCASECMP_L(VG_Z_LIBC_SONAME, strncasecmp_l) ++STRNCASECMP_L(VG_Z_LIBC_SONAME, __GI_strncasecmp_l) ++#endif ++ ++ + #define MEMCHR(soname, fnname) \ + void* VG_REPLACE_FUNCTION_ZU(soname,fnname) (const void *s, int c, SizeT n); \ + void* VG_REPLACE_FUNCTION_ZU(soname,fnname) (const void *s, int c, SizeT n) \ diff --git a/dev-util/valgrind/valgrind-3.6.0.ebuild b/dev-util/valgrind/valgrind-3.6.0.ebuild index b2be0c0fa61b..89de70591aaf 100644 --- a/dev-util/valgrind/valgrind-3.6.0.ebuild +++ b/dev-util/valgrind/valgrind-3.6.0.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.6.0.ebuild,v 1.1 2010/11/10 01:40:41 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.6.0.ebuild,v 1.2 2011/01/27 04:51:32 ssuominen Exp $ EAPI=2 inherit autotools eutils flag-o-matic toolchain-funcs multilib pax-utils @@ -31,15 +31,19 @@ src_prepare() { docs/Makefile.am || die # Yet more local labels, this time for ppc32 & ppc64 - epatch "${FILESDIR}/valgrind-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 # warning about executable stacks. - epatch "${FILESDIR}/valgrind-3.6.0-non-exec-stack.patch" + epatch "${FILESDIR}"/${PN}-3.6.0-non-exec-stack.patch # Fix up some suppressions that were not general enough for glibc versions # with more than just a major and minor number. - epatch "${FILESDIR}/valgrind-3.4.1-glibc-2.10.1.patch" + epatch "${FILESDIR}"/${PN}-3.4.1-glibc-2.10.1.patch + + # Fix for recent glibc + epatch "${FILESDIR}"/${PN}-3.6.0-glibc-2.13.patch + epatch "${FILESDIR}"/${PN}-3.6.0-strcasecmp.patch # Regenerate autotools files eautoreconf |