diff options
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind_3.25.0.bb')
| -rw-r--r-- | meta/recipes-devtools/valgrind/valgrind_3.25.0.bb | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.25.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.25.0.bb new file mode 100644 index 0000000000..67166a4ef0 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind_3.25.0.bb | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | SUMMARY = "Valgrind memory debugger and instrumentation framework" | ||
| 2 | HOMEPAGE = "http://valgrind.org/" | ||
| 3 | DESCRIPTION = "Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail." | ||
| 4 | BUGTRACKER = "http://valgrind.org/support/bug_reports.html" | ||
| 5 | LICENSE = "GPL-2.0-only & GPL-2.0-or-later & BSD-3-Clause" | ||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 7 | file://include/pub_tool_basics.h;beginline=6;endline=29;md5=41c410e8d3f305aee7aaa666b2e4f366 \ | ||
| 8 | file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \ | ||
| 9 | file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56" | ||
| 10 | |||
| 11 | SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ | ||
| 12 | file://fixed-perl-path.patch \ | ||
| 13 | file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ | ||
| 14 | file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ | ||
| 15 | file://avoid-neon-for-targets-which-don-t-support-it.patch \ | ||
| 16 | file://0001-configure-Drop-setting-mcpu-cortex-a8-on-arm.patch \ | ||
| 17 | file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ | ||
| 18 | file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \ | ||
| 19 | file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \ | ||
| 20 | file://0003-correct-include-directive-path-for-config.h.patch \ | ||
| 21 | file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \ | ||
| 22 | file://0001-memcheck-vgtests-remove-fullpath-after-flags.patch \ | ||
| 23 | file://s390x_vec_op_t.patch \ | ||
| 24 | file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \ | ||
| 25 | file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ | ||
| 26 | file://0001-docs-Disable-manual-validation.patch \ | ||
| 27 | file://0001-tests-arm-Use-O-instead-of-O0.patch \ | ||
| 28 | " | ||
| 29 | SRC_URI[sha256sum] = "295f60291d6b64c0d90c1ce645634bdc5361d39b0c50ecf9de6385ee77586ecc" | ||
| 30 | UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar" | ||
| 31 | |||
| 32 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64|riscv64).*-linux' | ||
| 33 | |||
| 34 | # valgrind supports armv7 and above | ||
| 35 | COMPATIBLE_HOST:armv4 = 'null' | ||
| 36 | COMPATIBLE_HOST:armv5 = 'null' | ||
| 37 | COMPATIBLE_HOST:armv6 = 'null' | ||
| 38 | |||
| 39 | # valgrind fails with powerpc soft-float | ||
| 40 | COMPATIBLE_HOST:powerpc = "${@bb.utils.contains('TARGET_FPU', 'soft', 'null', '.*-linux', d)}" | ||
| 41 | |||
| 42 | # X32 isn't supported by valgrind at this time | ||
| 43 | COMPATIBLE_HOST:linux-gnux32 = 'null' | ||
| 44 | COMPATIBLE_HOST:linux-muslx32 = 'null' | ||
| 45 | |||
| 46 | # Disable for some MIPS variants | ||
| 47 | COMPATIBLE_HOST:mipsarchr6 = 'null' | ||
| 48 | COMPATIBLE_HOST:linux-gnun32 = 'null' | ||
| 49 | |||
| 50 | # Disable for powerpc64 with musl | ||
| 51 | COMPATIBLE_HOST:libc-musl:powerpc64 = 'null' | ||
| 52 | |||
| 53 | inherit autotools-brokensep multilib_header | ||
| 54 | |||
| 55 | EXTRA_OECONF = "--enable-tls --without-mpicc" | ||
| 56 | EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}" | ||
| 57 | |||
| 58 | # valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option | ||
| 59 | EXTRA_OECONF:append:arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" | ||
| 60 | |||
| 61 | EXTRA_OEMAKE = "-w" | ||
| 62 | |||
| 63 | CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" | ||
| 64 | |||
| 65 | # valgrind likes to control its own optimisation flags. It generally defaults | ||
| 66 | # to -O2 but uses -O0 for some specific test apps etc. Passing our own flags | ||
| 67 | # (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it | ||
| 68 | # which fixes build path issue in DWARF. | ||
| 69 | SELECTED_OPTIMIZATION = "${DEBUG_LEVELFLAG}" | ||
| 70 | |||
| 71 | # Split out various helper scripts to separate packages to avoid the | ||
| 72 | # main package depending on perl and python. | ||
| 73 | PACKAGES =+ "${PN}-cachegrind ${PN}-massif ${PN}-callgrind" | ||
| 74 | |||
| 75 | FILES:${PN}-cachegrind = "${bindir}/cg_*" | ||
| 76 | FILES:${PN}-massif = "${bindir}/ms_*" | ||
| 77 | FILES:${PN}-callgrind = "${bindir}/callgrind_*" | ||
| 78 | |||
| 79 | RDEPENDS:${PN}-cachegrind = "${PN} python3-core" | ||
| 80 | RDEPENDS:${PN}-massif = "${PN} perl" | ||
| 81 | RDEPENDS:${PN}-callgrind = "${PN} perl" | ||
| 82 | |||
| 83 | do_configure:prepend () { | ||
| 84 | rm -rf ${S}/config.h | ||
| 85 | } | ||
| 86 | |||
| 87 | do_install:append () { | ||
| 88 | install -m 644 ${B}/default.supp ${D}/${libexecdir}/valgrind/ | ||
| 89 | oe_multilib_header valgrind/config.h | ||
| 90 | } | ||
| 91 | |||
| 92 | VALGRINDARCH ?= "${TARGET_ARCH}" | ||
| 93 | VALGRINDARCH:aarch64 = "arm64" | ||
| 94 | VALGRINDARCH:x86-64 = "amd64" | ||
| 95 | VALGRINDARCH:x86 = "x86" | ||
| 96 | VALGRINDARCH:mips = "mips32" | ||
| 97 | VALGRINDARCH:mipsel = "mips32" | ||
| 98 | VALGRINDARCH:mips64el = "mips64" | ||
| 99 | VALGRINDARCH:powerpc = "ppc" | ||
| 100 | VALGRINDARCH:powerpc64 = "ppc64" | ||
| 101 | VALGRINDARCH:powerpc64le = "ppc64le" | ||
| 102 | |||
| 103 | INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libexecdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so" | ||
| 104 | |||
| 105 | # valgrind needs debug information for ld.so at runtime in order to | ||
| 106 | # redirect functions like strlen. | ||
| 107 | RRECOMMENDS:${PN} += "${TCLIBC}-dbg" | ||
