blob: d056622b2bbedf20e7391272ae4eec0baf2d9146 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Fast, multi-threaded malloc() and nifty performance analysis tools"
2HOMEPAGE = "https://github.com/gperftools/gperftools"
Andrew Geissler32b11992021-03-31 13:37:05 -05003DESCRIPTION = "The gperftools, previously called google-perftools, package contains some \
4utilities to improve and analyze the performance of C++ programs. \
5Included are an optimized thread-caching malloc() and cpu and heap profiling utilities. \
6"
7
Andrew Geissler82c905d2020-04-13 13:39:40 -05008LICENSE = "BSD-3-Clause"
9LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a"
10
Patrick Williams213cb262021-08-07 19:21:33 -050011DEPENDS:append:libc-musl = " libucontext"
Andrew Geissler32b11992021-03-31 13:37:05 -050012
13SRCREV = "f7c6fb6c8e99d6b1b725e5994373bcd19ffdf8fd"
Andrew Geissler595f6302022-01-24 19:11:47 +000014SRC_URI = "git://github.com/gperftools/gperftools;branch=master;protocol=https \
Andrew Geissler82c905d2020-04-13 13:39:40 -050015 file://0001-Support-Atomic-ops-on-clang.patch \
16 file://0001-fix-build-with-musl-libc.patch \
17 file://0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch \
18 file://disable_libunwind_aarch64.patch \
19 file://sgidef.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050020 "
21
Patrick Williams213cb262021-08-07 19:21:33 -050022SRC_URI:append:libc-musl = " file://ppc-musl.patch"
Andrew Geissler32b11992021-03-31 13:37:05 -050023
Andrew Geissler82c905d2020-04-13 13:39:40 -050024inherit autotools
25
26S = "${WORKDIR}/git"
27
28# On mips, we have the following error.
29# do_page_fault(): sending SIGSEGV to ls for invalid read access from 00000008
30# Segmentation fault (core dumped)
Patrick Williams213cb262021-08-07 19:21:33 -050031COMPATIBLE_HOST:mipsarch = "null"
32COMPATIBLE_HOST:riscv64 = "null"
33COMPATIBLE_HOST:riscv32 = "null"
Andrew Geissler82c905d2020-04-13 13:39:40 -050034
35# Disable thumb1
36# {standard input}: Assembler messages:
37# {standard input}:434: Error: lo register required -- `ldr pc,[sp]'
38# Makefile:4538: recipe for target 'src/base/libtcmalloc_la-linuxthreads.lo' failed
Patrick Williams213cb262021-08-07 19:21:33 -050039ARM_INSTRUCTION_SET:armv5 = "arm"
40ARM_INSTRUCTION_SET:toolchain-clang:arm = "arm"
Andrew Geissler82c905d2020-04-13 13:39:40 -050041
Andrew Geissler9aee5002022-03-30 16:27:02 +000042EXTRA_OECONF:append:libc-musl:powerpc64le = " --disable-cpu-profiler"
43EXTRA_OECONF:append:libc-musl:powerpc = " --disable-cpu-profiler"
Andrew Geissler82c905d2020-04-13 13:39:40 -050044PACKAGECONFIG ?= "libunwind static"
Patrick Williams213cb262021-08-07 19:21:33 -050045PACKAGECONFIG:remove:arm:libc-musl = "libunwind"
46PACKAGECONFIG:remove:riscv64 = "libunwind"
47PACKAGECONFIG:remove:riscv32 = "libunwind"
Andrew Geissler82c905d2020-04-13 13:39:40 -050048
49PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
50PACKAGECONFIG[static] = "--enable-static,--disable-static,"
51
52PACKAGE_BEFORE_PN += "libtcmalloc-minimal"
Patrick Williams213cb262021-08-07 19:21:33 -050053FILES:libtcmalloc-minimal = "${libdir}/libtcmalloc_minimal*${SOLIBS} ${libdir}/libtcmalloc_minimal_debug*${SOLIBS}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050054
55# pprof tool requires Getopt::long and POSIX perl5 modules.
56# Also runs `objdump` on each cpuprofile data file
Patrick Williams213cb262021-08-07 19:21:33 -050057RDEPENDS:${PN} += " \
Andrew Geissler32b11992021-03-31 13:37:05 -050058 binutils \
59 curl \
60 perl-module-carp \
61 perl-module-cwd \
62 perl-module-getopt-long \
63 perl-module-overloading \
64 perl-module-posix \
65"
Andrew Geissler82c905d2020-04-13 13:39:40 -050066
Patrick Williams213cb262021-08-07 19:21:33 -050067RDEPENDS:${PN} += "libtcmalloc-minimal (= ${EXTENDPKGV})"