summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.1.bb
diff options
context:
space:
mode:
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.bb55
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
4SUMMARY = "General-purpose scalable concurrent malloc implementation"
5
6DESCRIPTION = "jemalloc is a general purpose malloc(3) implementation that emphasizes \
7fragmentation avoidance and scalable concurrency support."
8
9HOMEPAGE = "https://github.com/jemalloc/jemalloc"
10LICENSE = "BSD-2-Clause"
11
12SECTION = "libs"
13
14LIC_FILES_CHKSUM = "file://COPYING;md5=ea061f8731d5e6a5761dfad951ef5f5f"
15
16SRC_URI = "git://github.com/jemalloc/jemalloc.git;branch=master;protocol=https;tag=${PV} \
17 file://1a15fe33a48c52bfe26ea83e49f0d317a47da3ea.patch \
18 file://run-ptest \
19 "
20SRCREV = "81034ce1f1373e37dc865038e1bc8eeecf559ce8"
21PV_LONG := "${PV}-0-g${SRCREV}"
22
23inherit autotools ptest
24
25EXTRA_AUTORECONF += "--exclude=autoheader"
26
27EXTRA_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
30EXTRA_OECONF:append = " --with-version=${PV_LONG} --enable-xmalloc"
31# Enable jemalloc debug build flag if DEBUG_BUILD is enabled
32EXTRA_OECONF:append = " ${@oe.utils.vartrue('DEBUG_BUILD', '--enable-debug=yes', '', d)}"
33
34do_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
40do_compile_ptest() {
41 oe_runmake tests
42}
43
44do_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}