xref: /openbmc/openbmc/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools_2.15.bb (revision 03514f1996efa799e50da744818ba331c2e893b6)
1*03514f19SPatrick WilliamsSUMMARY = "Fast, multi-threaded malloc() and nifty performance analysis tools"
2*03514f19SPatrick WilliamsHOMEPAGE = "https://github.com/gperftools/gperftools"
3*03514f19SPatrick WilliamsDESCRIPTION = "The gperftools, previously called google-perftools, package contains some \
4*03514f19SPatrick Williamsutilities to improve and analyze the performance of C++ programs. \
5*03514f19SPatrick WilliamsIncluded are an optimized thread-caching malloc() and cpu and heap profiling utilities. \
6*03514f19SPatrick Williams"
7*03514f19SPatrick Williams
8*03514f19SPatrick WilliamsLICENSE = "BSD-3-Clause"
9*03514f19SPatrick WilliamsLIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a"
10*03514f19SPatrick Williams
11*03514f19SPatrick WilliamsDEPENDS:append:libc-musl = " libucontext"
12*03514f19SPatrick Williams
13*03514f19SPatrick WilliamsSRCREV = "365060c4213a48adb27f63d5dfad41b3dfbdd62e"
14*03514f19SPatrick WilliamsSRC_URI = "git://github.com/gperftools/gperftools;branch=master;protocol=https \
15*03514f19SPatrick Williams           file://0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch \
16*03514f19SPatrick Williams           file://disable_libunwind_aarch64.patch \
17*03514f19SPatrick Williams           file://0001-src-mmap_hook.cc-Fix-build-for-32bit-machine.patch \
18*03514f19SPatrick Williams           "
19*03514f19SPatrick Williams
20*03514f19SPatrick WilliamsSRC_URI:append:libc-musl = " file://ppc-musl.patch"
21*03514f19SPatrick Williams
22*03514f19SPatrick Williamsinherit autotools
23*03514f19SPatrick Williams
24*03514f19SPatrick WilliamsS = "${WORKDIR}/git"
25*03514f19SPatrick Williams
26*03514f19SPatrick Williams# On mips, we have the following error.
27*03514f19SPatrick Williams#   do_page_fault(): sending SIGSEGV to ls for invalid read access from 00000008
28*03514f19SPatrick Williams#   Segmentation fault (core dumped)
29*03514f19SPatrick WilliamsCOMPATIBLE_HOST:mipsarch = "null"
30*03514f19SPatrick WilliamsCOMPATIBLE_HOST:riscv64 = "null"
31*03514f19SPatrick WilliamsCOMPATIBLE_HOST:riscv32 = "null"
32*03514f19SPatrick Williams
33*03514f19SPatrick Williams# Disable thumb1
34*03514f19SPatrick Williams# {standard input}: Assembler messages:
35*03514f19SPatrick Williams# {standard input}:434: Error: lo register required -- `ldr pc,[sp]'
36*03514f19SPatrick Williams# Makefile:4538: recipe for target 'src/base/libtcmalloc_la-linuxthreads.lo' failed
37*03514f19SPatrick WilliamsARM_INSTRUCTION_SET:armv5 = "arm"
38*03514f19SPatrick WilliamsARM_INSTRUCTION_SET:toolchain-clang:arm = "arm"
39*03514f19SPatrick Williams
40*03514f19SPatrick WilliamsEXTRA_OECONF:append:libc-musl:powerpc64le = " --disable-cpu-profiler"
41*03514f19SPatrick WilliamsEXTRA_OECONF:append:libc-musl:powerpc = " --disable-cpu-profiler"
42*03514f19SPatrick WilliamsPACKAGECONFIG ?= "libunwind static"
43*03514f19SPatrick WilliamsPACKAGECONFIG:remove:arm:libc-musl = "libunwind"
44*03514f19SPatrick WilliamsPACKAGECONFIG:remove:riscv64 = "libunwind"
45*03514f19SPatrick WilliamsPACKAGECONFIG:remove:riscv32 = "libunwind"
46*03514f19SPatrick Williams
47*03514f19SPatrick WilliamsPACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
48*03514f19SPatrick WilliamsPACKAGECONFIG[static] = "--enable-static,--disable-static,"
49*03514f19SPatrick Williams
50*03514f19SPatrick WilliamsPACKAGE_BEFORE_PN += "libtcmalloc-minimal"
51*03514f19SPatrick WilliamsFILES:libtcmalloc-minimal = "${libdir}/libtcmalloc_minimal*${SOLIBS} ${libdir}/libtcmalloc_minimal_debug*${SOLIBS}"
52*03514f19SPatrick Williams
53*03514f19SPatrick Williams# pprof tool requires Getopt::long and POSIX perl5 modules.
54*03514f19SPatrick Williams# Also runs `objdump` on each cpuprofile data file
55*03514f19SPatrick WilliamsRDEPENDS:${PN} += " \
56*03514f19SPatrick Williams    binutils \
57*03514f19SPatrick Williams    curl \
58*03514f19SPatrick Williams    perl-module-carp \
59*03514f19SPatrick Williams    perl-module-cwd \
60*03514f19SPatrick Williams    perl-module-getopt-long \
61*03514f19SPatrick Williams    perl-module-overloading \
62*03514f19SPatrick Williams    perl-module-posix \
63*03514f19SPatrick Williams"
64*03514f19SPatrick Williams
65*03514f19SPatrick WilliamsRDEPENDS:${PN} += "libtcmalloc-minimal (= ${EXTENDPKGV})"
66