diff options
| author | Wang Mingyu <wangmy@cn.fujitsu.com> | 2020-06-24 09:21:59 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-25 10:23:37 +0100 |
| commit | 0c4cf4b7e15b31bd8be4a87a5b48992e7191ee43 (patch) | |
| tree | 5d1dd0a1269dd21b7fe0014e74a1466c6eab662d /meta/recipes-devtools/valgrind/valgrind_3.16.1.bb | |
| parent | 7ed1fd546d012d573b79a0f6147229a8b698e1bf (diff) | |
| download | poky-0c4cf4b7e15b31bd8be4a87a5b48992e7191ee43.tar.gz | |
valgrind: upgrade 3.16.0 -> 3.16.1
??Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
(From OE-Core rev: faaebe0df4f8e0b742a6c1a32ea5579210559ab9)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind_3.16.1.bb')
| -rw-r--r-- | meta/recipes-devtools/valgrind/valgrind_3.16.1.bb | 230 |
1 files changed, 230 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb b/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb new file mode 100644 index 0000000000..484a229a1a --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb | |||
| @@ -0,0 +1,230 @@ | |||
| 1 | SUMMARY = "Valgrind memory debugger and instrumentation framework" | ||
| 2 | HOMEPAGE = "http://valgrind.org/" | ||
| 3 | BUGTRACKER = "http://valgrind.org/support/bug_reports.html" | ||
| 4 | LICENSE = "GPLv2 & GPLv2+ & BSD" | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 6 | file://include/pub_tool_basics.h;beginline=6;endline=29;md5=41c410e8d3f305aee7aaa666b2e4f366 \ | ||
| 7 | file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \ | ||
| 8 | file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56" | ||
| 9 | |||
| 10 | DEPENDS = " \ | ||
| 11 | ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \ | ||
| 12 | " | ||
| 13 | |||
| 14 | SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ | ||
| 15 | file://fixed-perl-path.patch \ | ||
| 16 | file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ | ||
| 17 | file://run-ptest \ | ||
| 18 | file://remove-for-aarch64 \ | ||
| 19 | file://0004-Fix-out-of-tree-builds.patch \ | ||
| 20 | file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ | ||
| 21 | file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ | ||
| 22 | file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ | ||
| 23 | file://avoid-neon-for-targets-which-don-t-support-it.patch \ | ||
| 24 | file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ | ||
| 25 | file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \ | ||
| 26 | file://0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch \ | ||
| 27 | file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \ | ||
| 28 | file://0002-context-APIs-are-not-available-on-musl.patch \ | ||
| 29 | file://0003-correct-include-directive-path-for-config.h.patch \ | ||
| 30 | file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \ | ||
| 31 | file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \ | ||
| 32 | file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \ | ||
| 33 | file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \ | ||
| 34 | file://0001-fix-opcode-not-supported-on-mips32-linux.patch \ | ||
| 35 | file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \ | ||
| 36 | file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \ | ||
| 37 | file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \ | ||
| 38 | file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \ | ||
| 39 | file://0001-adjust-path-filter-for-2-memcheck-tests.patch \ | ||
| 40 | file://s390x_vec_op_t.patch \ | ||
| 41 | file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \ | ||
| 42 | file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ | ||
| 43 | " | ||
| 44 | SRC_URI[md5sum] = "d1b153f1ab17cf1f311705e7a83ef589" | ||
| 45 | SRC_URI[sha256sum] = "c91f3a2f7b02db0f3bc99479861656154d241d2fdb265614ba918cc6720a33ca" | ||
| 46 | UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar" | ||
| 47 | |||
| 48 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' | ||
| 49 | |||
| 50 | # valgrind supports armv7 and above | ||
| 51 | COMPATIBLE_HOST_armv4 = 'null' | ||
| 52 | COMPATIBLE_HOST_armv5 = 'null' | ||
| 53 | COMPATIBLE_HOST_armv6 = 'null' | ||
| 54 | |||
| 55 | # valgrind fails with powerpc soft-float | ||
| 56 | COMPATIBLE_HOST_powerpc = "${@bb.utils.contains('TARGET_FPU', 'soft', 'null', '.*-linux', d)}" | ||
| 57 | |||
| 58 | # X32 isn't supported by valgrind at this time | ||
| 59 | COMPATIBLE_HOST_linux-gnux32 = 'null' | ||
| 60 | COMPATIBLE_HOST_linux-muslx32 = 'null' | ||
| 61 | |||
| 62 | # Disable for some MIPS variants | ||
| 63 | COMPATIBLE_HOST_mipsarchr6 = 'null' | ||
| 64 | COMPATIBLE_HOST_linux-gnun32 = 'null' | ||
| 65 | |||
| 66 | # Disable for powerpc64 with musl | ||
| 67 | COMPATIBLE_HOST_libc-musl_powerpc64 = 'null' | ||
| 68 | |||
| 69 | # brokenseip is unfortunately required by ptests to pass | ||
| 70 | inherit autotools-brokensep ptest multilib_header | ||
| 71 | |||
| 72 | EXTRA_OECONF = "--enable-tls --without-mpicc" | ||
| 73 | EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}" | ||
| 74 | |||
| 75 | # valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option | ||
| 76 | EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" | ||
| 77 | |||
| 78 | EXTRA_OEMAKE = "-w" | ||
| 79 | |||
| 80 | CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" | ||
| 81 | |||
| 82 | # valgrind likes to control its own optimisation flags. It generally defaults | ||
| 83 | # to -O2 but uses -O0 for some specific test apps etc. Passing our own flags | ||
| 84 | # (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it | ||
| 85 | # which fixes build path issue in DWARF. | ||
| 86 | SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}" | ||
| 87 | |||
| 88 | do_configure_prepend () { | ||
| 89 | rm -rf ${S}/config.h | ||
| 90 | sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g' ${S}/none/tests/Makefile.am | ||
| 91 | sed -i -e 's:$(top_builddir):$(pkglibdir)/ptest:g' ${S}/memcheck/tests/Makefile.am | ||
| 92 | } | ||
| 93 | |||
| 94 | do_install_append () { | ||
| 95 | install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ | ||
| 96 | oe_multilib_header valgrind/config.h | ||
| 97 | } | ||
| 98 | |||
| 99 | VALGRINDARCH ?= "${TARGET_ARCH}" | ||
| 100 | VALGRINDARCH_aarch64 = "arm64" | ||
| 101 | VALGRINDARCH_x86-64 = "amd64" | ||
| 102 | VALGRINDARCH_x86 = "x86" | ||
| 103 | VALGRINDARCH_mips = "mips32" | ||
| 104 | VALGRINDARCH_mipsel = "mips32" | ||
| 105 | VALGRINDARCH_mips64el = "mips64" | ||
| 106 | VALGRINDARCH_powerpc = "ppc" | ||
| 107 | VALGRINDARCH_powerpc64 = "ppc64" | ||
| 108 | VALGRINDARCH_powerpc64el = "ppc64le" | ||
| 109 | |||
| 110 | INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so" | ||
| 111 | |||
| 112 | RDEPENDS_${PN} += "perl" | ||
| 113 | |||
| 114 | # valgrind needs debug information for ld.so at runtime in order to | ||
| 115 | # redirect functions like strlen. | ||
| 116 | RRECOMMENDS_${PN} += "${TCLIBC}-dbg" | ||
| 117 | |||
| 118 | RDEPENDS_${PN}-ptest += " bash coreutils file \ | ||
| 119 | gdb libgomp \ | ||
| 120 | perl \ | ||
| 121 | perl-module-getopt-long perl-module-file-basename perl-module-file-glob \ | ||
| 122 | procps sed ${PN}-dbg ${PN}-src" | ||
| 123 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" | ||
| 124 | |||
| 125 | # One of the tests contains a bogus interpreter path on purpose. | ||
| 126 | # Skip file dependency check | ||
| 127 | SKIP_FILEDEPS_${PN}-ptest = '1' | ||
| 128 | INSANE_SKIP_${PN}-ptest = "debug-deps" | ||
| 129 | |||
| 130 | do_compile_ptest() { | ||
| 131 | oe_runmake check | ||
| 132 | } | ||
| 133 | |||
| 134 | do_install_ptest() { | ||
| 135 | chmod +x ${B}/tests/vg_regtest | ||
| 136 | |||
| 137 | # The test application binaries are not automatically installed. | ||
| 138 | # Grab them from the build directory. | ||
| 139 | # | ||
| 140 | # The regression tests require scripts and data files that are not | ||
| 141 | # copied to the build directory. They must be copied from the | ||
| 142 | # source directory. | ||
| 143 | saved_dir=$PWD | ||
| 144 | for parent_dir in ${S} ${B} ; do | ||
| 145 | cd $parent_dir | ||
| 146 | |||
| 147 | subdirs=" \ | ||
| 148 | .in_place \ | ||
| 149 | cachegrind/tests \ | ||
| 150 | callgrind/tests \ | ||
| 151 | dhat/tests \ | ||
| 152 | drd/tests \ | ||
| 153 | gdbserver_tests \ | ||
| 154 | helgrind/tests \ | ||
| 155 | lackey/tests \ | ||
| 156 | massif/tests \ | ||
| 157 | memcheck/tests \ | ||
| 158 | none/tests \ | ||
| 159 | tests \ | ||
| 160 | exp-bbv/tests \ | ||
| 161 | exp-dhat/tests \ | ||
| 162 | exp-sgcheck/tests \ | ||
| 163 | " | ||
| 164 | # Get the vg test scripts, filters, and expected files | ||
| 165 | for dir in $subdirs ; do | ||
| 166 | find $dir | cpio -pvdu ${D}${PTEST_PATH} | ||
| 167 | done | ||
| 168 | cd $saved_dir | ||
| 169 | done | ||
| 170 | |||
| 171 | # The scripts reference config.h so add it to the top ptest dir. | ||
| 172 | cp ${B}/config.h ${D}${PTEST_PATH} | ||
| 173 | install -D ${WORKDIR}/remove-for-aarch64 ${D}${PTEST_PATH} | ||
| 174 | |||
| 175 | # Add an executable need by none/tests/bigcode | ||
| 176 | mkdir ${D}${PTEST_PATH}/perf | ||
| 177 | cp ${B}/perf/bigcode ${D}${PTEST_PATH}/perf | ||
| 178 | |||
| 179 | # Add an executable needed by memcheck/tests/vcpu_bz2 | ||
| 180 | cp ${B}/perf/bz2 ${D}${PTEST_PATH}/perf | ||
| 181 | |||
| 182 | # Make the ptest dir look like the top level valgrind src dir | ||
| 183 | # This is checked by the gdbserver_tests/make_local_links script | ||
| 184 | mkdir ${D}${PTEST_PATH}/coregrind | ||
| 185 | cp ${B}/coregrind/vgdb ${D}${PTEST_PATH}/coregrind | ||
| 186 | |||
| 187 | # Add an executable needed by massif tests | ||
| 188 | cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print | ||
| 189 | |||
| 190 | find ${D}${PTEST_PATH} \ | ||
| 191 | \( \ | ||
| 192 | -name "Makefile*" \ | ||
| 193 | -o -name "*.o" \ | ||
| 194 | \) \ | ||
| 195 | -exec rm {} \; | ||
| 196 | |||
| 197 | # These files need to be newer so touch them. | ||
| 198 | touch ${D}${PTEST_PATH}/cachegrind/tests/a.c -r ${D}${PTEST_PATH}/cachegrind/tests/cgout-test | ||
| 199 | |||
| 200 | # find *_annotate in ${bindir} for yocto build | ||
| 201 | sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann1.vgtest | ||
| 202 | sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann2.vgtest | ||
| 203 | |||
| 204 | sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann1.vgtest | ||
| 205 | sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann2.vgtest | ||
| 206 | |||
| 207 | # handle multilib | ||
| 208 | sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest | ||
| 209 | sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest | ||
| 210 | |||
| 211 | # This test fails on the host as well, using both 3.15 and git master (as of Jan 24 2020) | ||
| 212 | # https://bugs.kde.org/show_bug.cgi?id=402833 | ||
| 213 | rm ${D}${PTEST_PATH}/memcheck/tests/overlap.vgtest | ||
| 214 | |||
| 215 | # As the binary isn't stripped or debug-splitted, the source file isn't fetched | ||
| 216 | # via dwarfsrcfiles either, so it needs to be installed manually. | ||
| 217 | mkdir -p ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/ | ||
| 218 | install ${S}/none/tests/tls.c ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/ | ||
| 219 | } | ||
| 220 | |||
| 221 | # avoid stripping some generated binaries otherwise some of the tests will fail | ||
| 222 | # run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail | ||
| 223 | INHIBIT_PACKAGE_STRIP_FILES = "\ | ||
| 224 | ${PKGD}${PTEST_PATH}/none/tests/tls \ | ||
| 225 | ${PKGD}${PTEST_PATH}/none/tests/tls.so \ | ||
| 226 | ${PKGD}${PTEST_PATH}/none/tests/tls2.so \ | ||
| 227 | ${PKGD}${PTEST_PATH}/helgrind/tests/tc09_bad_unlock \ | ||
| 228 | ${PKGD}${PTEST_PATH}/memcheck/tests/manuel1 \ | ||
| 229 | ${PKGD}${PTEST_PATH}/drd/tests/pth_detached3 \ | ||
| 230 | " | ||
