diff options
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind_3.25.1.bb')
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind_3.25.1.bb | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.25.1.bb b/meta/recipes-devtools/valgrind/valgrind_3.25.1.bb new file mode 100644 index 0000000000..a8b0be5767 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind_3.25.1.bb | |||
@@ -0,0 +1,116 @@ | |||
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 | file://0001-Use-portable-syntax-for-pushsection-directive-in-inl.patch \ | ||
29 | " | ||
30 | SRC_URI[sha256sum] = "61deb8d0727b45c268efdc1b3b6c9e679cd97cbf5ee4b28d1dead7c8b7a271af" | ||
31 | UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar" | ||
32 | |||
33 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64|riscv64).*-linux' | ||
34 | |||
35 | # valgrind supports armv7 and above | ||
36 | COMPATIBLE_HOST:armv4 = 'null' | ||
37 | COMPATIBLE_HOST:armv5 = 'null' | ||
38 | COMPATIBLE_HOST:armv6 = 'null' | ||
39 | |||
40 | # valgrind fails with powerpc soft-float | ||
41 | COMPATIBLE_HOST:powerpc = "${@bb.utils.contains('TARGET_FPU', 'soft', 'null', '.*-linux', d)}" | ||
42 | |||
43 | # X32 isn't supported by valgrind at this time | ||
44 | COMPATIBLE_HOST:linux-gnux32 = 'null' | ||
45 | COMPATIBLE_HOST:linux-muslx32 = 'null' | ||
46 | |||
47 | # Disable for some MIPS variants | ||
48 | COMPATIBLE_HOST:mipsarchr6 = 'null' | ||
49 | COMPATIBLE_HOST:linux-gnun32 = 'null' | ||
50 | |||
51 | # Disable for powerpc64 with musl | ||
52 | COMPATIBLE_HOST:libc-musl:powerpc64 = 'null' | ||
53 | |||
54 | inherit autotools-brokensep multilib_header | ||
55 | |||
56 | EXTRA_OECONF = "--enable-tls --without-mpicc" | ||
57 | EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}" | ||
58 | |||
59 | # valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option | ||
60 | EXTRA_OECONF:append:arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" | ||
61 | |||
62 | EXTRA_OEMAKE = "-w" | ||
63 | |||
64 | CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" | ||
65 | |||
66 | # valgrind likes to control its own optimisation flags. It generally defaults | ||
67 | # to -O2 but uses -O0 for some specific test apps etc. Passing our own flags | ||
68 | # (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it | ||
69 | # which fixes build path issue in DWARF. | ||
70 | SELECTED_OPTIMIZATION = "${DEBUG_LEVELFLAG}" | ||
71 | |||
72 | # Split out various helper scripts to separate packages to avoid the | ||
73 | # main package depending on perl and python. | ||
74 | PACKAGES =+ "${PN}-cachegrind ${PN}-massif ${PN}-callgrind" | ||
75 | |||
76 | FILES:${PN}-cachegrind = "${bindir}/cg_*" | ||
77 | FILES:${PN}-massif = "${bindir}/ms_*" | ||
78 | FILES:${PN}-callgrind = "${bindir}/callgrind_*" | ||
79 | |||
80 | RDEPENDS:${PN}-cachegrind = "${PN} python3-core" | ||
81 | RDEPENDS:${PN}-massif = "${PN} perl" | ||
82 | RDEPENDS:${PN}-callgrind = "${PN} perl" | ||
83 | |||
84 | do_configure:prepend () { | ||
85 | rm -rf ${S}/config.h | ||
86 | } | ||
87 | |||
88 | do_install:append () { | ||
89 | install -m 644 ${B}/default.supp ${D}/${libexecdir}/valgrind/ | ||
90 | oe_multilib_header valgrind/config.h | ||
91 | } | ||
92 | |||
93 | VALGRINDARCH ?= "${TARGET_ARCH}" | ||
94 | VALGRINDARCH:aarch64 = "arm64" | ||
95 | VALGRINDARCH:x86-64 = "amd64" | ||
96 | VALGRINDARCH:x86 = "x86" | ||
97 | VALGRINDARCH:mips = "mips32" | ||
98 | VALGRINDARCH:mipsel = "mips32" | ||
99 | VALGRINDARCH:mips64el = "mips64" | ||
100 | VALGRINDARCH:powerpc = "ppc" | ||
101 | VALGRINDARCH:powerpc64 = "ppc64" | ||
102 | VALGRINDARCH:powerpc64le = "ppc64le" | ||
103 | |||
104 | INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libexecdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so" | ||
105 | |||
106 | # valgrind needs debug information for ld.so at runtime in order to | ||
107 | # redirect functions like strlen. | ||
108 | RRECOMMENDS:${PN} += "${TCLIBC}-dbg" | ||
109 | |||
110 | # Valgrind needs intrinsics which are not provided by clang | ||
111 | # m_signals.c:2213:7: error: __builtin_longjmp is not supported for the current target | ||
112 | # 2213 | VG_MINIMAL_LONGJMP(tst->sched_jmpbuf); | ||
113 | # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
114 | # | ||
115 | # It needs something like - https://bugs.kde.org/show_bug.cgi?id=369723 | ||
116 | TOOLCHAIN:riscv64 = "gcc" | ||