diff options
author | David Seifert <soap@gentoo.org> | 2021-10-30 18:47:09 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-10-30 18:47:09 +0200 |
commit | 17141c97e9313f7f73148036e5d3dc96f9760f15 (patch) | |
tree | 3959224eefad69ec44b2fe548078b716d6d37477 /dev-util/roctracer | |
parent | sys-libs/glibc: Bump locale-gen version in 2.34 and later (diff) | |
download | gentoo-17141c97e9313f7f73148036e5d3dc96f9760f15.tar.gz gentoo-17141c97e9313f7f73148036e5d3dc96f9760f15.tar.bz2 gentoo-17141c97e9313f7f73148036e5d3dc96f9760f15.zip |
dev-util/roctracer: pthread_yield -> sched_yield (glibc 2.34)
Closes: https://bugs.gentoo.org/808049
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-util/roctracer')
-rw-r--r-- | dev-util/roctracer/files/roctracer-4.3.0-glibc-2.34.patch | 35 | ||||
-rw-r--r-- | dev-util/roctracer/roctracer-4.3.0.ebuild | 9 |
2 files changed, 41 insertions, 3 deletions
diff --git a/dev-util/roctracer/files/roctracer-4.3.0-glibc-2.34.patch b/dev-util/roctracer/files/roctracer-4.3.0-glibc-2.34.patch new file mode 100644 index 000000000000..e11b1148bb89 --- /dev/null +++ b/dev-util/roctracer/files/roctracer-4.3.0-glibc-2.34.patch @@ -0,0 +1,35 @@ +From 5f4c1c01de8f0da24956c1c931d3ffe7410b5b78 Mon Sep 17 00:00:00 2001 +From: David Seifert <soap@gentoo.org> +Date: Sat, 30 Oct 2021 18:35:53 +0200 +Subject: [PATCH] pthread_yield -> sched_yield (glibc 2.34) + +Bug: https://bugs.gentoo.org/808049 +Upstream: https://github.com/ROCm-Developer-Tools/roctracer/pull/63 +--- + src/core/memory_pool.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/core/memory_pool.h b/src/core/memory_pool.h +index fe2f1a6..fbd9060 100644 +--- a/src/core/memory_pool.h ++++ b/src/core/memory_pool.h +@@ -24,6 +24,7 @@ THE SOFTWARE. + #define MEMORY_POOL_H_ + + #include <pthread.h> ++#include <sched.h> + #include <stdlib.h> + + #include <atomic> +@@ -152,7 +153,7 @@ class MemoryPool { + } + + static void sync_reader(const consumer_arg_t* arg) { +- while(arg->valid.load() == true) PTHREAD_CALL(pthread_yield()); ++ while(arg->valid.load() == true) PTHREAD_CALL(sched_yield()); + } + + static void* reader_fun(void* consumer_arg) { +-- +2.33.1 + diff --git a/dev-util/roctracer/roctracer-4.3.0.ebuild b/dev-util/roctracer/roctracer-4.3.0.ebuild index 19a0adee967b..35092c81a554 100644 --- a/dev-util/roctracer/roctracer-4.3.0.ebuild +++ b/dev-util/roctracer/roctracer-4.3.0.ebuild @@ -11,6 +11,7 @@ DESCRIPTION="Callback/Activity Library for Performance tracing AMD GPU's" HOMEPAGE="https://github.com/ROCm-Developer-Tools/roctracer.git" SRC_URI="https://github.com/ROCm-Developer-Tools/roctracer/archive/rocm-${PV}.tar.gz -> rocm-tracer-${PV}.tar.gz https://github.com/ROCm-Developer-Tools/rocprofiler/archive/rocm-${PV}.tar.gz -> rocprofiler-${PV}.tar.gz" +S="${WORKDIR}/roctracer-rocm-${PV}" LICENSE="MIT" SLOT="0/$(ver_cut 1-2)" @@ -26,13 +27,16 @@ BDEPEND=" ') " +PATCHES=( + # https://github.com/ROCm-Developer-Tools/roctracer/pull/63 + "${FILESDIR}"/${PN}-4.3.0-glibc-2.34.patch +) + python_check_deps() { has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]" && has_version "dev-python/ply[${PYTHON_USEDEP}]" } -S="${WORKDIR}/roctracer-rocm-${PV}" - src_prepare() { mv "${WORKDIR}"/rocprofiler-rocm-${PV} "${WORKDIR}"/rocprofiler || die @@ -54,7 +58,6 @@ src_prepare() { hprefixify script/*.py - eapply_user cmake_src_prepare } |