Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 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" |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 10 | LICENSE = "BSD-2-Clause" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 11 | |
| 12 | SECTION = "libs" |
| 13 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea061f8731d5e6a5761dfad951ef5f5f" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 15 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 16 | SRC_URI = "git://github.com/jemalloc/jemalloc.git;branch=master;protocol=https \ |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 17 | file://run-ptest \ |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 18 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 19 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 20 | # Workaround for https://github.com/llvm/llvm-project/issues/52765 |
| 21 | SRC_URI:append:libc-glibc:toolchain-clang = " file://0001-test-Disable-optimization-with-clang-for-aligned_all.patch " |
| 22 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 23 | SRCREV = "54eaed1d8b56b1aa528be3bdd1877e59c56fa90c" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 24 | |
| 25 | S = "${WORKDIR}/git" |
| 26 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 27 | inherit autotools ptest |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 28 | |
| 29 | EXTRA_AUTORECONF += "--exclude=autoheader" |
| 30 | |
| 31 | EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 32 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 33 | do_install:append() { |
| 34 | sed -i -e 's@${STAGING_DIR_HOST}@@g' \ |
| 35 | -e 's@${STAGING_DIR_NATIVE}@@g' \ |
| 36 | -e 's@${WORKDIR}@@g' ${D}${bindir}/jemalloc-config |
| 37 | } |
| 38 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 39 | do_compile_ptest() { |
| 40 | oe_runmake tests |
| 41 | } |
| 42 | |
| 43 | do_install_ptest() { |
| 44 | install -d ${D}${PTEST_PATH}/tests |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame^] | 45 | subdirs="unit integration stress " |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 46 | for tooltest in ${subdirs} |
| 47 | do |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame^] | 48 | cp -r ${B}/test/${tooltest} ${D}${PTEST_PATH}/tests |
| 49 | if find ${S}/test/${tooltest}/ -name '*.sh' -print -quit | grep -q .; then |
| 50 | cp ${S}/test/${tooltest}/*.sh ${D}${PTEST_PATH}/tests/${tooltest} |
| 51 | fi |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 52 | done |
| 53 | find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \; |
| 54 | } |