Archived
1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
archive/package/devel/valgrind/patches/200-musl_fix.patch
Hauke Mehrtens 7f4be3b099 valgrind: update to 3.10.1 and fix kernel >= 4.0
This updates valgrind to version 3.10.1 and make configure work with
kernel version > 4.0. This patch was taken from upstream valgrind.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>


SVN-Revision: 46302
2015-07-11 20:55:36 +00:00

46 lines
1.5 KiB
Diff

--- a/coregrind/vg_preloaded.c
+++ b/coregrind/vg_preloaded.c
@@ -56,7 +56,7 @@
void VG_NOTIFY_ON_LOAD(freeres)( void );
void VG_NOTIFY_ON_LOAD(freeres)( void )
{
-# if !defined(__UCLIBC__) \
+# if !defined(__UCLIBC__) && defined(__GLIBC__) \
&& !defined(VGPV_arm_linux_android) && !defined(VGPV_x86_linux_android) \
&& !defined(VGPV_mips32_linux_android)
extern void __libc_freeres(void);
--- a/include/pub_tool_redir.h
+++ b/include/pub_tool_redir.h
@@ -241,7 +241,7 @@
/* --- Soname of the standard C library. --- */
#if defined(VGO_linux)
-# define VG_Z_LIBC_SONAME libcZdsoZa // libc.so*
+# define VG_Z_LIBC_SONAME libcZdZa // libc.*
#elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6)
# define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib
@@ -273,7 +273,11 @@
/* --- Soname of the pthreads library. --- */
#if defined(VGO_linux)
+# if defined(__GLIBC__) || defined(__UCLIBC__)
# define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd0 // libpthread.so.0
+# else
+# define VG_Z_LIBPTHREAD_SONAME libcZdZa // libc.*
+# endif
#elif defined(VGO_darwin)
# define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib
#else
--- a/configure.ac
+++ b/configure.ac
@@ -1025,8 +1025,6 @@ case "${GLIBC_VERSION}" in
*)
AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.19])
- AC_MSG_ERROR([or Darwin or Bionic libc])
;;
esac