summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-02-14 20:52:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-15 16:28:45 +0000
commit1a3204c96519071cdee53e6a5d634279e61218c4 (patch)
tree9326478f62642ce383f9ae3fe2dd071e1e84f978 /meta/recipes-devtools/valgrind
parente8b0da157f102349d1ace9da6193320fc9cd16d4 (diff)
downloadpoky-1a3204c96519071cdee53e6a5d634279e61218c4.tar.gz
valgrind: Fix build with musl
(From OE-Core rev: 0ec5ac9453e037f3999f4fa57750f87270bb78d9) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/valgrind')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch69
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.11.0.bb6
2 files changed, 73 insertions, 2 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch b/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch
new file mode 100644
index 0000000000..dc6feff7ff
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch
@@ -0,0 +1,69 @@
1From 1b1a024efd18d44294e184e792c1e039cab02bfe Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 14 Feb 2016 09:14:12 +0000
4Subject: [PATCH] fix build for musl targets
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 configure.ac | 2 --
11 coregrind/vg_preloaded.c | 2 +-
12 include/pub_tool_redir.h | 7 +++++--
13 3 files changed, 6 insertions(+), 5 deletions(-)
14
15diff --git a/configure.ac b/configure.ac
16index 9366dc7..679f514 100644
17--- a/configure.ac
18+++ b/configure.ac
19@@ -1066,8 +1066,6 @@ case "${GLIBC_VERSION}" in
20 ;;
21 2.0|2.1|*)
22 AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
23- AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later,])
24- AC_MSG_ERROR([Darwin libc, Bionic libc or Solaris libc])
25 ;;
26 esac
27
28diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c
29index 2ea7a7a..e49c832 100644
30--- a/coregrind/vg_preloaded.c
31+++ b/coregrind/vg_preloaded.c
32@@ -56,7 +56,7 @@
33 void VG_NOTIFY_ON_LOAD(freeres)( void );
34 void VG_NOTIFY_ON_LOAD(freeres)( void )
35 {
36-# if !defined(__UCLIBC__) \
37+# if !defined(__UCLIBC__) && defined(__GLIBC__) \
38 && !defined(VGPV_arm_linux_android) \
39 && !defined(VGPV_x86_linux_android) \
40 && !defined(VGPV_mips32_linux_android) \
41diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h
42index bac00d7..fbb2ef2 100644
43--- a/include/pub_tool_redir.h
44+++ b/include/pub_tool_redir.h
45@@ -242,8 +242,7 @@
46 /* --- Soname of the standard C library. --- */
47
48 #if defined(VGO_linux) || defined(VGO_solaris)
49-# define VG_Z_LIBC_SONAME libcZdsoZa // libc.so*
50-
51+# define VG_Z_LIBC_SONAME libcZdZa // libc.*
52 #elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6)
53 # define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib
54
55@@ -274,7 +273,11 @@
56 /* --- Soname of the pthreads library. --- */
57
58 #if defined(VGO_linux)
59+# if defined(__GLIBC__) || defined(__UCLIBC__)
60 # define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd0 // libpthread.so.0
61+# else
62+# define VG_Z_LIBPTHREAD_SONAME libcZdZa // libc.*
63+#endif
64 #elif defined(VGO_darwin)
65 # define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib
66 #elif defined(VGO_solaris)
67--
682.7.1
69
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
index 7ef1e48bda..7e232400cc 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
@@ -23,8 +23,10 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
23 file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ 23 file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
24 file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ 24 file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
25 file://avoid-neon-for-targets-which-don-t-support-it.patch \ 25 file://avoid-neon-for-targets-which-don-t-support-it.patch \
26 " 26"
27 27SRC_URI_append_libc-musl = "\
28 file://0001-fix-build-for-musl-targets.patch \
29"
28SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129" 30SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129"
29SRC_URI[sha256sum] = "6c396271a8c1ddd5a6fb9abe714ea1e8a86fce85b30ab26b4266aeb4c2413b42" 31SRC_URI[sha256sum] = "6c396271a8c1ddd5a6fb9abe714ea1e8a86fce85b30ab26b4266aeb4c2413b42"
30 32