blob: bd3b2afaea10878e397205d9f63cffa90a2883db [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
Patrick Williams03514f12024-04-05 07:04:11 -050013SRCREV = "365060c4213a48adb27f63d5dfad41b3dfbdd62e"
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-disbale-heap-checkers-and-debug-allocator-on-musl.patch \
16 file://disable_libunwind_aarch64.patch \
Patrick Williams03514f12024-04-05 07:04:11 -050017 file://0001-src-mmap_hook.cc-Fix-build-for-32bit-machine.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050018 "
19
Patrick Williams213cb262021-08-07 19:21:33 -050020SRC_URI:append:libc-musl = " file://ppc-musl.patch"
Andrew Geissler32b11992021-03-31 13:37:05 -050021
Andrew Geissler82c905d2020-04-13 13:39:40 -050022inherit autotools
23
24S = "${WORKDIR}/git"
25
26# On mips, we have the following error.
27# do_page_fault(): sending SIGSEGV to ls for invalid read access from 00000008
28# Segmentation fault (core dumped)
Patrick Williams213cb262021-08-07 19:21:33 -050029COMPATIBLE_HOST:mipsarch = "null"
30COMPATIBLE_HOST:riscv64 = "null"
31COMPATIBLE_HOST:riscv32 = "null"
Andrew Geissler82c905d2020-04-13 13:39:40 -050032
33# Disable thumb1
34# {standard input}: Assembler messages:
35# {standard input}:434: Error: lo register required -- `ldr pc,[sp]'
36# Makefile:4538: recipe for target 'src/base/libtcmalloc_la-linuxthreads.lo' failed
Patrick Williams213cb262021-08-07 19:21:33 -050037ARM_INSTRUCTION_SET:armv5 = "arm"
38ARM_INSTRUCTION_SET:toolchain-clang:arm = "arm"
Andrew Geissler82c905d2020-04-13 13:39:40 -050039
Andrew Geissler9aee5002022-03-30 16:27:02 +000040EXTRA_OECONF:append:libc-musl:powerpc64le = " --disable-cpu-profiler"
41EXTRA_OECONF:append:libc-musl:powerpc = " --disable-cpu-profiler"
Andrew Geissler82c905d2020-04-13 13:39:40 -050042PACKAGECONFIG ?= "libunwind static"
Patrick Williams213cb262021-08-07 19:21:33 -050043PACKAGECONFIG:remove:arm:libc-musl = "libunwind"
44PACKAGECONFIG:remove:riscv64 = "libunwind"
45PACKAGECONFIG:remove:riscv32 = "libunwind"
Andrew Geissler82c905d2020-04-13 13:39:40 -050046
47PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
48PACKAGECONFIG[static] = "--enable-static,--disable-static,"
49
50PACKAGE_BEFORE_PN += "libtcmalloc-minimal"
Patrick Williams213cb262021-08-07 19:21:33 -050051FILES:libtcmalloc-minimal = "${libdir}/libtcmalloc_minimal*${SOLIBS} ${libdir}/libtcmalloc_minimal_debug*${SOLIBS}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050052
53# pprof tool requires Getopt::long and POSIX perl5 modules.
54# Also runs `objdump` on each cpuprofile data file
Patrick Williams213cb262021-08-07 19:21:33 -050055RDEPENDS:${PN} += " \
Andrew Geissler32b11992021-03-31 13:37:05 -050056 binutils \
57 curl \
58 perl-module-carp \
59 perl-module-cwd \
60 perl-module-getopt-long \
61 perl-module-overloading \
62 perl-module-posix \
63"
Andrew Geissler82c905d2020-04-13 13:39:40 -050064
Patrick Williams213cb262021-08-07 19:21:33 -050065RDEPENDS:${PN} += "libtcmalloc-minimal (= ${EXTENDPKGV})"