diff options
Diffstat (limited to 'meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.1.bb')
| -rw-r--r-- | meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.1.bb | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.1.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.1.bb new file mode 100644 index 0000000000..f3a310029f --- /dev/null +++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.1.bb | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | # Copyright (C) 2021 Mingli Yu <mingli.yu@windriver.com> | ||
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
| 3 | |||
| 4 | SUMMARY = "General-purpose scalable concurrent malloc implementation" | ||
| 5 | |||
| 6 | DESCRIPTION = "jemalloc is a general purpose malloc(3) implementation that emphasizes \ | ||
| 7 | fragmentation avoidance and scalable concurrency support." | ||
| 8 | |||
| 9 | HOMEPAGE = "https://github.com/jemalloc/jemalloc" | ||
| 10 | LICENSE = "BSD-2-Clause" | ||
| 11 | |||
| 12 | SECTION = "libs" | ||
| 13 | |||
| 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea061f8731d5e6a5761dfad951ef5f5f" | ||
| 15 | |||
| 16 | SRC_URI = "git://github.com/jemalloc/jemalloc.git;branch=master;protocol=https;tag=${PV} \ | ||
| 17 | file://1a15fe33a48c52bfe26ea83e49f0d317a47da3ea.patch \ | ||
| 18 | file://run-ptest \ | ||
| 19 | " | ||
| 20 | SRCREV = "81034ce1f1373e37dc865038e1bc8eeecf559ce8" | ||
| 21 | PV_LONG := "${PV}-0-g${SRCREV}" | ||
| 22 | |||
| 23 | inherit autotools ptest | ||
| 24 | |||
| 25 | EXTRA_AUTORECONF += "--exclude=autoheader" | ||
| 26 | |||
| 27 | EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_" | ||
| 28 | # For some reason VERSION file populated only in tarball distribution. | ||
| 29 | # Adding jemalloc version since this recipe is using source code from git tag | ||
| 30 | EXTRA_OECONF:append = " --with-version=${PV_LONG} --enable-xmalloc" | ||
| 31 | # Enable jemalloc debug build flag if DEBUG_BUILD is enabled | ||
| 32 | EXTRA_OECONF:append = " ${@oe.utils.vartrue('DEBUG_BUILD', '--enable-debug=yes', '', d)}" | ||
| 33 | |||
| 34 | do_install:append() { | ||
| 35 | sed -i -e 's@${STAGING_DIR_HOST}@@g' \ | ||
| 36 | -e 's@${STAGING_DIR_NATIVE}@@g' \ | ||
| 37 | -e 's@${WORKDIR}@@g' ${D}${bindir}/jemalloc-config | ||
| 38 | } | ||
| 39 | |||
| 40 | do_compile_ptest() { | ||
| 41 | oe_runmake tests | ||
| 42 | } | ||
| 43 | |||
| 44 | do_install_ptest() { | ||
| 45 | install -d ${D}${PTEST_PATH}/tests | ||
| 46 | subdirs="unit integration stress " | ||
| 47 | for tooltest in ${subdirs} | ||
| 48 | do | ||
| 49 | cp -r ${B}/test/${tooltest} ${D}${PTEST_PATH}/tests | ||
| 50 | if find ${S}/test/${tooltest}/ -name '*.sh' -print -quit | grep -q .; then | ||
| 51 | cp ${S}/test/${tooltest}/*.sh ${D}${PTEST_PATH}/tests/${tooltest} | ||
| 52 | fi | ||
| 53 | done | ||
| 54 | find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \; | ||
| 55 | } | ||
