added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,33 @@
From 3fe67deb9fcf0ae3c2ff31a9eccb6a0a9af33b9c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 14 Jan 2022 09:47:03 -0800
Subject: [PATCH] test: Disable optimization with clang for aligned_alloc.c
Clang crashes when using glibc 2.35, it works ok with older glibc or
musl, so its very specific problem. Its reported here
https://github.com/llvm/llvm-project/issues/52765
Until it is fixed, workaround the build failure
Upstream-Status: Inappropriate [Workaround]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
test/integration/aligned_alloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/integration/aligned_alloc.c b/test/integration/aligned_alloc.c
index 4375b172..6513bdd9 100644
--- a/test/integration/aligned_alloc.c
+++ b/test/integration/aligned_alloc.c
@@ -1,5 +1,7 @@
#include "test/jemalloc_test.h"
+#pragma clang optimize off
+
#define MAXALIGN (((size_t)1) << 23)
/*
--
2.34.1

View File

@@ -0,0 +1,48 @@
#!/bin/sh
export MALLOC_CONF_ALL=${MALLOC_CONF}
# Concatenate the individual test's MALLOC_CONF and MALLOC_CONF_ALL.
export_malloc_conf() {
if [ "x${MALLOC_CONF}" != "x" -a "x${MALLOC_CONF_ALL}" != "x" ] ; then
export MALLOC_CONF="${MALLOC_CONF},${MALLOC_CONF_ALL}"
else
export MALLOC_CONF="${MALLOC_CONF}${MALLOC_CONF_ALL}"
fi
}
saved_dir=$PWD
for dir in tests/* ; do
cd $dir
for atest in * ; do
if [[ "${atest##*.}" == "sh" ]]; then
continue
fi
if [ -e "${atest}.sh" ] ; then
# Source the shell script corresponding to the test in a subshell and
# execute the test. This allows the shell script to set MALLOC_CONF, which
# is then used to set MALLOC_CONF (thus allowing the
# per test shell script to ignore the detail).
enable_fill=1 \
enable_prof=1 \
. $(pwd)/${atest}.sh && \
export_malloc_conf
else
export MALLOC_CONF= && \
export_malloc_conf
fi
if [ \( -x $atest \) -a \( -f $atest \) ] ; then
rm -rf tests.log
./$atest > tests.log 2>&1
sed -e '/: pass/ s/^/PASS: /g' \
-e '/: skip/ s/^/SKIP: /g' \
-e '/: fail/ s/^/FAIL: /g' \
-e 's/: pass//g' \
-e 's/: skip//g' \
-e 's/: fail//g' \
-e '/^--- pass:/d' tests.log
fi
done
cd $saved_dir
done

View File

@@ -0,0 +1,54 @@
# 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="unit integration stress "
for tooltest in ${subdirs}
do
cp -r ${B}/test/${tooltest} ${D}${PTEST_PATH}/tests
if find ${S}/test/${tooltest}/ -name '*.sh' -print -quit | grep -q .; then
cp ${S}/test/${tooltest}/*.sh ${D}${PTEST_PATH}/tests/${tooltest}
fi
done
find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \;
}