valgrind: update to the latest version, fix build issues on ARM
authorFelix Fietkau <nbd@nbd.name>
Tue, 5 Jul 2016 08:08:59 +0000 (10:08 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 7 Jul 2016 08:57:45 +0000 (10:57 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/devel/valgrind/Makefile
package/devel/valgrind/patches/100-fix_configure_check.patch
package/devel/valgrind/patches/120-Fix-configure-for-Linux-kernel-4.0-rc1.patch [deleted file]
package/devel/valgrind/patches/120-mips_fix_soft_float.patch [new file with mode: 0644]
package/devel/valgrind/patches/130-fix_arm_arch_detection.patch [new file with mode: 0644]
package/devel/valgrind/patches/130-mips_fix_soft_float.patch [deleted file]
package/devel/valgrind/patches/200-musl_fix.patch

index 6a576a24d0000998e8029cbf28864bb13caac815..04d06d91a6847db253bef4f3faedd60ac655dd56 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=valgrind
-PKG_VERSION:=3.10.1
+PKG_VERSION:=3.11.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://valgrind.org/downloads/
-PKG_MD5SUM:=60ddae962bc79e7c95cfc4667245707f
+PKG_MD5SUM:=6c396271a8c1ddd5a6fb9abe714ea1e8a86fce85b30ab26b4266aeb4c2413b42
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_LICENSE:=GPL-2.0+
@@ -22,6 +22,7 @@ PKG_FIXUP = autoreconf
 PKG_INSTALL := 1
 PKG_BUILD_PARALLEL := 1
 PKG_USE_MIPS16:=0
+PKG_SSP:=0
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/kernel.mk
index 87ef3b39fc55c44c021eef0926d8309800f1013b..48477a38636baa34dae3b08c66af57dce2a4d9ca 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -300,7 +300,7 @@ case "${host_os}" in
+@@ -328,7 +328,7 @@ case "${host_os}" in
          # Ok, this is linux. Check the kernel version
          AC_MSG_CHECKING([for the kernel version])
  
@@ -8,4 +8,4 @@
 +        kernel=${UNAME_R:-`uname -r`}
  
          case "${kernel}" in
-              2.6.*|3.*) 
+              0.*|1.*|2.0.*|2.1.*|2.2.*|2.3.*|2.4.*|2.5.*) 
diff --git a/package/devel/valgrind/patches/120-Fix-configure-for-Linux-kernel-4.0-rc1.patch b/package/devel/valgrind/patches/120-Fix-configure-for-Linux-kernel-4.0-rc1.patch
deleted file mode 100644 (file)
index b833f18..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-From bf803555d10b5b4c9223b24bf13845ee88d8f3b5 Mon Sep 17 00:00:00 2001
-From: cborntra <cborntra@a5019735-40e9-0310-863c-91ae7b9d1cf9>
-Date: Mon, 23 Feb 2015 20:19:03 +0000
-Subject: [PATCH] Fix configure for Linux kernel >= 4.0-rc1 In addition raise
- the minimal Linux version to 2.6 as there is almost no test coverage for 2.4
- and 2.6 was released in 2003.
-
-git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14955 a5019735-40e9-0310-863c-91ae7b9d1cf9
----
- NEWS         |  3 +++
- configure.ac | 18 ++++++------------
- 2 files changed, 9 insertions(+), 12 deletions(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -303,20 +303,14 @@ case "${host_os}" in
-         kernel=${UNAME_R:-`uname -r`}
-         case "${kernel}" in
--             2.6.*|3.*) 
--                  AC_MSG_RESULT([2.6.x/3.x family (${kernel})])
--                  AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x])
--                  ;;
--
--             2.4.*) 
--                  AC_MSG_RESULT([2.4 family (${kernel})])
--                  AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x])
--                  ;;
--
--             *) 
-+             0.*|1.*|2.0.*|2.1.*|2.2.*|2.3.*|2.4.*|2.5.*) 
-                   AC_MSG_RESULT([unsupported (${kernel})])
--                  AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6])
-+                  AC_MSG_ERROR([Valgrind needs a Linux kernel >= 2.6])
-                   ;;
-+
-+             *)
-+                  AC_MSG_RESULT([2.6 or later (${kernel})])
-+                    ;;
-         esac
-         ;;
diff --git a/package/devel/valgrind/patches/120-mips_fix_soft_float.patch b/package/devel/valgrind/patches/120-mips_fix_soft_float.patch
new file mode 100644 (file)
index 0000000..1cf5aec
--- /dev/null
@@ -0,0 +1,34 @@
+--- a/VEX/priv/guest_mips_helpers.c
++++ b/VEX/priv/guest_mips_helpers.c
+@@ -1201,6 +1201,7 @@ extern UInt mips_dirtyhelper_calculate_F
+                                                    flt_op inst )
+ {
+    UInt ret = 0;
++#ifndef __mips_soft_float
+ #if defined(__mips__)
+    VexGuestMIPS32State* guest_state = (VexGuestMIPS32State*)gs;
+    UInt loFsVal, hiFsVal, loFtVal, hiFtVal;
+@@ -1320,6 +1321,7 @@ extern UInt mips_dirtyhelper_calculate_F
+          break;
+    }
+ #endif
++#endif
+    return ret;
+ }
+@@ -1329,6 +1331,7 @@ extern UInt mips_dirtyhelper_calculate_F
+                                                    flt_op inst )
+ {
+    UInt ret = 0;
++#ifndef __mips_soft_float
+ #if defined(__mips__)
+ #if defined(VGA_mips32)
+    VexGuestMIPS32State* guest_state = (VexGuestMIPS32State*)gs;
+@@ -1439,6 +1442,7 @@ extern UInt mips_dirtyhelper_calculate_F
+          break;
+    }
+ #endif
++#endif
+    return ret;
+ }
diff --git a/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch b/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch
new file mode 100644 (file)
index 0000000..c8d2033
--- /dev/null
@@ -0,0 +1,17 @@
+Description: Fix FTBFS on armhf by correctly detecting the architecture
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/730844
+Author: Alessandro Ghedini <ghedo@debian.org>
+Last-Update: 2013-11-30
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -234,7 +234,7 @@ case "${host_cpu}" in
+         ARCH_MAX="s390x"
+         ;;
+-     armv7*)
++     arm*)
+       AC_MSG_RESULT([ok (${host_cpu})])
+       ARCH_MAX="arm"
+       ;;
diff --git a/package/devel/valgrind/patches/130-mips_fix_soft_float.patch b/package/devel/valgrind/patches/130-mips_fix_soft_float.patch
deleted file mode 100644 (file)
index e1d387c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/VEX/priv/guest_mips_helpers.c
-+++ b/VEX/priv/guest_mips_helpers.c
-@@ -1189,6 +1189,7 @@ extern UInt mips_dirtyhelper_calculate_F
-                                                    flt_op inst )
- {
-    UInt ret = 0;
-+#ifndef __mips_soft_float
- #if defined(__mips__)
-    VexGuestMIPS32State* guest_state = (VexGuestMIPS32State*)gs;
-    UInt loFsVal, hiFsVal, loFtVal, hiFtVal;
-@@ -1308,6 +1309,7 @@ extern UInt mips_dirtyhelper_calculate_F
-          break;
-    }
- #endif
-+#endif
-    return ret;
- }
-@@ -1317,6 +1319,7 @@ extern UInt mips_dirtyhelper_calculate_F
-                                                    flt_op inst )
- {
-    UInt ret = 0;
-+#ifndef __mips_soft_float
- #if defined(__mips__)
- #if defined(VGA_mips32)
-    VexGuestMIPS32State* guest_state = (VexGuestMIPS32State*)gs;
-@@ -1427,6 +1430,7 @@ extern UInt mips_dirtyhelper_calculate_F
-          break;
-    }
- #endif
-+#endif
-    return ret;
- }
index e61e822b2583751a62f879a66b751529a9e91b26..23d74e0caf3bf1191d3cfbd7ad0300319796a5aa 100644 (file)
@@ -6,21 +6,21 @@
  {
 -#  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);
+       && !defined(VGPV_arm_linux_android) \
+       && !defined(VGPV_x86_linux_android) \
+       && !defined(VGPV_mips32_linux_android) \
 --- a/include/pub_tool_redir.h
 +++ b/include/pub_tool_redir.h
-@@ -241,7 +241,7 @@
+@@ -242,7 +242,7 @@
  /* --- Soname of the standard C library. --- */
  
- #if defined(VGO_linux)
+ #if defined(VGO_linux) || defined(VGO_solaris)
 -#  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 @@
+@@ -274,7 +274,11 @@
  /* --- Soname of the pthreads library. --- */
  
  #if defined(VGO_linux)
 +# endif
  #elif defined(VGO_darwin)
  #  define  VG_Z_LIBPTHREAD_SONAME  libSystemZdZaZddylib  // libSystem.*.dylib
- #else
+ #elif defined(VGO_solaris)
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1025,8 +1025,6 @@ case "${GLIBC_VERSION}" in
-      *)
+@@ -1066,8 +1066,6 @@ case "${GLIBC_VERSION}" in
+       ;;
+      2.0|2.1|*)
        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])
+-      AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later,])
+-      AC_MSG_ERROR([Darwin libc, Bionic libc or Solaris libc])
        ;;
  esac