From 54d020345ebde2c3e7044b144e829e14b4f81f3d Mon Sep 17 00:00:00 2001 From: Saul Wold Date: Tue, 28 Oct 2014 07:57:54 -0700 Subject: valgrind: Upgrade to 3.10.0 Rebase existing patches Add patch to fix rpath issue with ptest (From OE-Core rev: 80b7db50d191c27c8ea78206140a4fa23adcf292) Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- .../valgrind/remove-arm-variant-specific.patch | 20 +++-- .../valgrind/remove-ppc-tests-failing-build.patch | 26 +++--- .../valgrind/valgrind/valgrind-remove-rpath.patch | 25 ++++++ meta/recipes-devtools/valgrind/valgrind_3.10.0.bb | 98 ++++++++++++++++++++++ meta/recipes-devtools/valgrind/valgrind_3.9.0.bb | 98 ---------------------- 5 files changed, 147 insertions(+), 120 deletions(-) create mode 100644 meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch create mode 100644 meta/recipes-devtools/valgrind/valgrind_3.10.0.bb delete mode 100644 meta/recipes-devtools/valgrind/valgrind_3.9.0.bb (limited to 'meta') diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch index 46dea60eb3..f84bf9ae9a 100644 --- a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch +++ b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch @@ -8,13 +8,13 @@ Upstream-Status: Pending Signed-off-by: Dave Lerner -diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am -index 2a19f5b..ccdeb77 100644 ---- a/none/tests/arm/Makefile.am -+++ b/none/tests/arm/Makefile.am -@@ -16,15 +16,16 @@ EXTRA_DIST = \ - vcvt_fixed_float_VFP.vgtest \ - vfp.stdout.exp vfp.stderr.exp vfp.vgtest +Index: valgrind-3.10.0/none/tests/arm/Makefile.am +=================================================================== +--- valgrind-3.10.0.orig/none/tests/arm/Makefile.am ++++ valgrind-3.10.0/none/tests/arm/Makefile.am +@@ -17,15 +17,16 @@ EXTRA_DIST = \ + vfp.stdout.exp vfp.stderr.exp vfp.vgtest \ + vfpv4_fma.stdout.exp vfpv4_fma.stderr.exp vfpv4_fma.vgtest +# For yocto: +# Only include tests that don't require Thumb. @@ -31,8 +31,8 @@ index 2a19f5b..ccdeb77 100644 - v6intThumb \ v6media \ vcvt_fixed_float_VFP \ - vfp -@@ -34,32 +35,3 @@ AM_CXXFLAGS += @FLAG_M32@ + vfp \ +@@ -36,34 +37,3 @@ AM_CXXFLAGS += @FLAG_M32@ AM_CCASFLAGS += @FLAG_M32@ allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ @@ -65,3 +65,5 @@ index 2a19f5b..ccdeb77 100644 -intdiv_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb -ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb -ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm +- +-vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4 -marm diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch b/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch index 2a14e1852c..1c640ffb71 100644 --- a/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch +++ b/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch @@ -36,10 +36,10 @@ Upstream-Status: Pending Signed-off-by: Dave Lerner -diff --git a/memcheck/tests/ppc32/Makefile.am b/memcheck/tests/ppc32/Makefile.am -index bd70eea..1436e8e 100644 ---- a/memcheck/tests/ppc32/Makefile.am -+++ b/memcheck/tests/ppc32/Makefile.am +Index: valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am +=================================================================== +--- valgrind-3.10.0.orig/memcheck/tests/ppc32/Makefile.am ++++ valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am @@ -7,8 +7,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest \ power_ISA2_05.stdout.exp_Without_FPPO @@ -50,11 +50,11 @@ index bd70eea..1436e8e 100644 power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \ -I$(top_srcdir)/include @FLAG_M32@ -diff --git a/none/tests/ppc32/Makefile.am b/none/tests/ppc32/Makefile.am -index 4f581b6..91ce7e7 100644 ---- a/none/tests/ppc32/Makefile.am -+++ b/none/tests/ppc32/Makefile.am -@@ -50,16 +50,8 @@ check_PROGRAMS = \ +Index: valgrind-3.10.0/none/tests/ppc32/Makefile.am +=================================================================== +--- valgrind-3.10.0.orig/none/tests/ppc32/Makefile.am ++++ valgrind-3.10.0/none/tests/ppc32/Makefile.am +@@ -52,16 +52,8 @@ check_PROGRAMS = \ allexec \ bug129390-ppc32 \ bug139050-ppc32 \ @@ -67,9 +67,9 @@ index 4f581b6..91ce7e7 100644 - test_isa_2_07_part1 \ - test_isa_2_07_part2 \ - test_tm \ -- test_touch_tm +- test_touch_tm \ + ldstrev lsw mftocrf mcrfs test_fx test_gx \ -+ twi tw xlc_dbl_u32 power6_bcmp ++ twi tw xlc_dbl_u32 power6_bcmp \ + ldst_multiple \ + data-cache-instructions - AM_CFLAGS += @FLAG_M32@ - AM_CXXFLAGS += @FLAG_M32@ diff --git a/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch b/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch new file mode 100644 index 0000000000..07a272633e --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch @@ -0,0 +1,25 @@ + +Upstream-Status: Inapporpiate [embedded config] +Signed-off-by: Saul Wold + +Index: valgrind-3.10.0/none/tests/Makefile.am +=================================================================== +--- valgrind-3.10.0.orig/none/tests/Makefile.am ++++ valgrind-3.10.0/none/tests/Makefile.am +@@ -280,7 +280,6 @@ threaded_fork_LDADD = -lpthread + threadederrno_LDADD = -lpthread + tls_SOURCES = tls.c tls2.c + tls_DEPENDENCIES = tls.so tls2.so +-tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests + tls_LDADD = tls.so tls2.so -lpthread + tls_so_SOURCES = tls_so.c + tls_so_DEPENDENCIES = tls2.so +@@ -288,7 +287,7 @@ if VGCONF_OS_IS_DARWIN + tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic + tls_so_LDADD = `pwd`/tls2.so + else +- tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC ++ tls_so_LDFLAGS = -shared -fPIC + tls_so_LDADD = tls2.so + endif + tls_so_CFLAGS = $(AM_CFLAGS) -fPIC diff --git a/meta/recipes-devtools/valgrind/valgrind_3.10.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.10.0.bb new file mode 100644 index 0000000000..4c6e1a7a0a --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind_3.10.0.bb @@ -0,0 +1,98 @@ +SUMMARY = "Valgrind memory debugger and instrumentation framework" +HOMEPAGE = "http://valgrind.org/" +BUGTRACKER = "http://valgrind.org/support/bug_reports.html" +LICENSE = "GPLv2 & GPLv2+ & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \ + file://include/pub_tool_basics.h;beginline=1;endline=29;md5=e7071929a50d4b0fc27a3014b315b0f7 \ + file://include/valgrind.h;beginline=1;endline=56;md5=92df8a1bde56fe2af70931ff55f6622f \ + file://COPYING.DOCS;md5=8fdeb5abdb235a08e76835f8f3260215" + +X11DEPENDS = "virtual/libx11" +DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}" + +SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \ + file://fixed-perl-path.patch \ + file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ + file://sepbuildfix.patch \ + file://glibc-2.20.patch \ + file://force-nostabs.patch \ + file://remove-arm-variant-specific.patch \ + file://remove-ppc-tests-failing-build.patch \ + file://valgrind-remove-rpath.patch \ + file://add-ptest.patch \ + file://run-ptest \ + " + +SRC_URI[md5sum] = "7c311a72a20388aceced1aa5573ce970" +SRC_URI[sha256sum] = "03047f82dfc6985a4c7d9d2700e17bc05f5e1a0ca6ad902e5d6c81aeb720edc9" + +COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64).*-linux' +COMPATIBLE_HOST_armv7a = 'arm.*-linux' + +inherit autotools ptest + +EXTRA_OECONF = "--enable-tls --without-mpicc" +EXTRA_OECONF_armv7a = "--enable-tls -host=armv7-none-linux-gnueabi --without-mpicc" +EXTRA_OEMAKE = "-w" +PARALLEL_MAKE = "" + +do_install_append () { + install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ +} + +RDEPENDS_${PN} += "perl" + +FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*" + +# valgrind needs debug information for ld.so at runtime in order to +# redirect functions like strlen. +RRECOMMENDS_${PN} += "${TCLIBC}-dbg" + +RDEPENDS_${PN}-ptest += " sed perl glibc-utils" + +do_compile_ptest() { + oe_runmake check +} + + +do_install_ptest() { + chmod +x ${B}/tests/vg_regtest + + # The test application binaries are not automatically installed. + # Grab them from the build directory. + # + # The regression tests require scripts and data files that are not + # copied to the build directory. They must be copied from the + # source directory. + saved_dir=$PWD + for parent_dir in ${S} ${B} ; do + cd $parent_dir + + # 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" + + # Get the vg test scripts, filters, and expected files + for dir in $subdirs ; do + find $dir | cpio -pvdu ${D}${PTEST_PATH} + done + cd $saved_dir + done + + # clean out build artifacts before building the rpm + find ${D}${PTEST_PATH} \ + \( -name "Makefile*" \ + -o -name "*.o" \ + -o -name "*.c" \ + -o -name "*.S" \ + -o -name "*.h" \) \ + -exec rm {} \; + + # needed by massif tests + cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print + + # handle multilib + sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest +} + diff --git a/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb deleted file mode 100644 index c415e773a8..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb +++ /dev/null @@ -1,98 +0,0 @@ -SUMMARY = "Valgrind memory debugger and instrumentation framework" -HOMEPAGE = "http://valgrind.org/" -BUGTRACKER = "http://valgrind.org/support/bug_reports.html" -LICENSE = "GPLv2 & GPLv2+ & BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \ - file://include/pub_tool_basics.h;beginline=1;endline=29;md5=e7071929a50d4b0fc27a3014b315b0f7 \ - file://include/valgrind.h;beginline=1;endline=56;md5=92df8a1bde56fe2af70931ff55f6622f \ - file://COPYING.DOCS;md5=8fdeb5abdb235a08e76835f8f3260215" - -X11DEPENDS = "virtual/libx11" -DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}" -PR = "r8" - -SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \ - file://fixed-perl-path.patch \ - file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ - file://sepbuildfix.patch \ - file://glibc-2.20.patch \ - file://force-nostabs.patch \ - file://remove-arm-variant-specific.patch \ - file://remove-ppc-tests-failing-build.patch \ - file://add-ptest.patch \ - file://run-ptest \ - " - -SRC_URI[md5sum] = "0947de8112f946b9ce64764af7be6df2" -SRC_URI[sha256sum] = "e6af71a06bc2534541b07743e1d58dc3caf744f38205ca3e5b5a0bdf372ed6f0" - -COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64).*-linux' -COMPATIBLE_HOST_armv7a = 'arm.*-linux' - -inherit autotools ptest - -EXTRA_OECONF = "--enable-tls --without-mpicc" -EXTRA_OECONF_armv7a = "--enable-tls -host=armv7-none-linux-gnueabi --without-mpicc" -EXTRA_OEMAKE = "-w" -PARALLEL_MAKE = "" - -do_install_append () { - install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ -} - -RDEPENDS_${PN} += "perl" - -FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*" - -# valgrind needs debug information for ld.so at runtime in order to -# redirect functions like strlen. -RRECOMMENDS_${PN} += "${TCLIBC}-dbg" - -RDEPENDS_${PN}-ptest += " sed perl glibc-utils" - -do_compile_ptest() { - oe_runmake check -} - - -do_install_ptest() { - chmod +x ${B}/tests/vg_regtest - - # The test application binaries are not automatically installed. - # Grab them from the build directory. - # - # The regression tests require scripts and data files that are not - # copied to the build directory. They must be copied from the - # source directory. - saved_dir=$PWD - for parent_dir in ${S} ${B} ; do - cd $parent_dir - - # 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" - - # Get the vg test scripts, filters, and expected files - for dir in $subdirs ; do - find $dir | cpio -pvdu ${D}${PTEST_PATH} - done - cd $saved_dir - done - - # clean out build artifacts before building the rpm - find ${D}${PTEST_PATH} \ - \( -name "Makefile*" \ - -o -name "*.o" \ - -o -name "*.c" \ - -o -name "*.S" \ - -o -name "*.h" \) \ - -exec rm {} \; - - # needed by massif tests - cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print - - # handle multilib - sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest -} - -- cgit v1.2.3-54-g00ecf