summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools/valgrind
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-devtools/valgrind')
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-Fix-dependencies-between-libcoregrind-.a-and-m_main..patch45
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch27
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch37
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch39
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch32
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb (renamed from poky/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb)36
6 files changed, 127 insertions, 89 deletions
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Fix-dependencies-between-libcoregrind-.a-and-m_main..patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Fix-dependencies-between-libcoregrind-.a-and-m_main..patch
deleted file mode 100644
index bedf1c127..000000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Fix-dependencies-between-libcoregrind-.a-and-m_main..patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 7820fc268fae4353118b6355f1d4b9e1b7eeebec Mon Sep 17 00:00:00 2001
-From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
-Date: Sun, 28 Oct 2018 18:35:11 +0100
-Subject: [PATCH] Fix dependencies between libcoregrind*.a and
- *m_main.o/*m_libcsetjmp.o
-
-The primary and secondary coregrind libraries must be updated
-when m_main.c or m_libcsetjmp.c are changed.
-
-A dependency was missing between libcoregrind*.a and libnolto_coregrind*.a,
-and so tools were not relinked when m_main.c or m_libcsetjmp.c were
-changed.
-
-Upstream-Status: Backport[git://sourceware.org/git/valgrind.git 7820fc268fae4353118b6355f1d4b9e1b7eeebec]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- coregrind/Makefile.am | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
-index 914a270..8de1996 100644
---- a/coregrind/Makefile.am
-+++ b/coregrind/Makefile.am
-@@ -511,6 +511,8 @@ libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS += \
- endif
- libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_LIBADD = \
- $(libnolto_coregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_OBJECTS)
-+libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_DEPENDENCIES = \
-+ libnolto_coregrind-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
-
- if VGCONF_HAVE_PLATFORM_SEC
- libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
-@@ -531,6 +533,8 @@ libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS += \
- endif
- libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_LIBADD = \
- $(libnolto_coregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_OBJECTS)
-+libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_DEPENDENCIES = \
-+ libnolto_coregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
- endif
-
- #----------------------------------------------------------------------------
---
-2.10.2
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch
new file mode 100644
index 000000000..e7af5efec
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch
@@ -0,0 +1,27 @@
+From 5eebdefd2251803e7d21081745018fcb16b2ba71 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Wed, 8 May 2019 20:16:52 -0400
+Subject: [PATCH] Return a valid exit_code from vg_regtest
+
+Upstream-Status: Pending
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ tests/vg_regtest.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
+index 909af3be8..f2799c4e3 100755
+--- a/tests/vg_regtest.in
++++ b/tests/vg_regtest.in
+@@ -403,6 +403,7 @@ sub mysystem($)
+ exit 1;
+ }
+ }
++ return $exit_code;
+ }
+ # if $keepunfiltered, copies $1 to $1.unfiltered.out
+ # renames $0 tp $1
+--
+2.17.0
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch
deleted file mode 100644
index 657f80335..000000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 8c1ebb564f5eca2baeedc27a703200786d1abb0b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 22 Dec 2018 15:28:40 -0800
-Subject: [PATCH] tests/amd64: Do not clobber %rsp register
-
-This is seen with gcc-9.0 compiler now which is fix that gcc community
-did recently
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813
-
-Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=402480]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- none/tests/amd64-linux/bug345887.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/none/tests/amd64-linux/bug345887.c b/none/tests/amd64-linux/bug345887.c
-index 0f9237d..4b07fe1 100644
---- a/none/tests/amd64-linux/bug345887.c
-+++ b/none/tests/amd64-linux/bug345887.c
-@@ -20,13 +20,14 @@ static void inner(void)
- "movq $0x10d, %%r14\n"
- "movq $0x10e, %%r15\n"
- // not %rbp as mdb is then not able to reconstruct stack trace
-- "movq $0x10f, %%rsp\n"
-+ // not %rsp since gcc ignores it and since gcc >= 9.0 errors about it
-+ // see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813
- "movq $0x1234, (%%rax)\n" // should cause SEGV here
- "ud2" // should never get here
- : // no output registers
- : // no input registers
- : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi",
-- "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "%rsp");
-+ "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15");
- }
-
- __attribute__((noinline))
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch
new file mode 100644
index 000000000..bf0f0ded2
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch
@@ -0,0 +1,39 @@
+From d1dea3c2bcf1e22baab39e2c0b8ca59db8a5bc37 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Mon, 13 May 2019 17:12:21 -0400
+Subject: [PATCH 1/2] valgrind: filter_xml_frames: do not filter /usr
+
+filter_xml_frames is intended to filter system paths under
+'/usr' that vary from platform to platform. In the ptest case
+for Yocto's valgrind, the ptest executables are placed under:
+ /usr/lib/valgrind/ptest
+and if these frames are filtered out, then the 'drd' tests fail
+the comparision between exepected and actual output.
+
+Changing this filter allows the comparison to succeed without
+any negative impact.
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ tests/filter_xml_frames | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tests/filter_xml_frames b/tests/filter_xml_frames
+index f1fa3f070..04fbc82de 100755
+--- a/tests/filter_xml_frames
++++ b/tests/filter_xml_frames
+@@ -47,7 +47,8 @@ while (my $line = <>)
+ $has_function_name = 1 if ($line =~ /<fn>/);
+ # This may require tweaking; currently /lib and /usr/lib are matched
+ $has_system_obj = 1 if ($line =~ /<obj>\/lib/);
+- $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/);
++# for Yocto, skip /usr since tests are under /usr/lib/...
++# $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/);
+ }
+ }
+
+--
+2.17.0
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch
new file mode 100644
index 000000000..a82972ec1
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch
@@ -0,0 +1,32 @@
+From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Mon, 13 May 2019 17:26:26 -0400
+Subject: [PATCH 2/2] valgrind: adjust std_list expected output
+
+The run-ptest script uses a custom --yocto-ptest option
+to change the summary statistics that valgrind issues
+to a format that matches what ptest-runner expects.
+
+Only this std_list test which checks that strcpy() works
+properly on Ubuntu-12.04 and later is affected by this change.
+It's normal output when called with --yocto-ptest is a blank
+line so adjust the expected output.
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ drd/tests/std_list.stderr.exp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/drd/tests/std_list.stderr.exp b/drd/tests/std_list.stderr.exp
+index d18786f80..8b1378917 100644
+--- a/drd/tests/std_list.stderr.exp
++++ b/drd/tests/std_list.stderr.exp
+@@ -1,3 +1 @@
+
+-
+-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+--
+2.17.0
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
index db1bd9fc5..ae3498f55 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
+++ b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
@@ -12,7 +12,7 @@ DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d
${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \
"
-SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
+SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
file://fixed-perl-path.patch \
file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
file://run-ptest \
@@ -36,11 +36,12 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
file://0001-fix-opcode-not-supported-on-mips32-linux.patch \
file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \
file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
- file://0001-tests-amd64-Do-not-clobber-rsp-register.patch \
- file://0001-Fix-dependencies-between-libcoregrind-.a-and-m_main..patch \
+ file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \
+ file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \
+ file://0002-valgrind-adjust-std_list-expected-output.patch \
"
-SRC_URI[md5sum] = "74175426afa280184b62591b58c671b3"
-SRC_URI[sha256sum] = "037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5"
+SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975"
+SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"
UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
@@ -109,12 +110,13 @@ RDEPENDS_${PN} += "perl"
# redirect functions like strlen.
RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
-RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob"
+RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob ${PN}-dbg"
RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
# One of the tests contains a bogus interpreter path on purpose.
# Skip file dependency check
SKIP_FILEDEPS_${PN}-ptest = '1'
+INSANE_SKIP_${PN}-ptest = "debug-deps"
do_compile_ptest() {
oe_runmake check
@@ -136,7 +138,17 @@ do_install_ptest() {
# exclude shell or the package won't install
rm -rf none/tests/shell* 2>/dev/null
- subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests"
+ subdirs=" \
+ cachegrind/tests \
+ callgrind/tests \
+ drd/tests \
+ gdbserver_tests \
+ helgrind/tests \
+ massif/tests \
+ memcheck/tests \
+ none/tests \
+ tests \
+ "
# Get the vg test scripts, filters, and expected files
for dir in $subdirs ; do
@@ -145,6 +157,8 @@ do_install_ptest() {
cd $saved_dir
done
+ # Hide then restore a.c that is used by ann[12].vgtest in call/cachegrind
+ mv ${D}${PTEST_PATH}/cachegrind/tests/a.c ${D}${PTEST_PATH}/cachegrind/tests/a_c
# clean out build artifacts before building the rpm
find ${D}${PTEST_PATH} \
\( -name "Makefile*" \
@@ -153,6 +167,14 @@ do_install_ptest() {
-o -name "*.S" \
-o -name "*.h" \) \
-exec rm {} \;
+ mv ${D}${PTEST_PATH}/cachegrind/tests/a_c ${D}${PTEST_PATH}/cachegrind/tests/a.c
+
+ # find *_annotate in ${bindir} for yocto build
+ sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann1.vgtest
+ sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann2.vgtest
+
+ sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann1.vgtest
+ sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann2.vgtest
# needed by massif tests
cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print