diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb b/meta-openembedded/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb new file mode 100644 index 0000000000..950b64ee9b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb @@ -0,0 +1,51 @@ +# Copyright (C) 2021 Mingli Yu <mingli.yu@windriver.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "General-purpose scalable concurrent malloc implementation" + +DESCRIPTION = "jemalloc is a general purpose malloc(3) implementation that emphasizes \ +fragmentation avoidance and scalable concurrency support." + +HOMEPAGE = "https://github.com/jemalloc/jemalloc" +LICENSE = "BSD-2-Clause" + +SECTION = "libs" + +LIC_FILES_CHKSUM = "file://COPYING;md5=ea061f8731d5e6a5761dfad951ef5f5f" + +SRC_URI = "git://github.com/jemalloc/jemalloc.git;branch=master;protocol=https \ + file://run-ptest \ + " + +# Workaround for https://github.com/llvm/llvm-project/issues/52765 +SRC_URI:append:libc-glibc:toolchain-clang = " file://0001-test-Disable-optimization-with-clang-for-aligned_all.patch " + +SRCREV = "54eaed1d8b56b1aa528be3bdd1877e59c56fa90c" + +S = "${WORKDIR}/git" + +inherit autotools ptest + +EXTRA_AUTORECONF += "--exclude=autoheader" + +EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_" + +do_install:append() { + sed -i -e 's@${STAGING_DIR_HOST}@@g' \ + -e 's@${STAGING_DIR_NATIVE}@@g' \ + -e 's@${WORKDIR}@@g' ${D}${bindir}/jemalloc-config +} + +do_compile_ptest() { + oe_runmake tests +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + subdirs="test/unit test/integration test/stress " + for tooltest in ${subdirs} + do + cp -r ${B}/${tooltest} ${D}${PTEST_PATH}/tests + done + find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \; +} |