From fb5f9b6afd78f2f62e51e35a75d9dfef6ea0ab9d Mon Sep 17 00:00:00 2001 From: Violet Purcell Date: Fri, 5 Jun 2026 18:21:42 -0400 Subject: [PATCH] Revert "sys-kernel/scx: remove llvm-r2.eclass" I thought this would not cause any issues but it unfortunately seems like it affected the ability for bindgen to find libclang in some circumstances. Revert it. This reverts commit 771a9249d4b0d8851a6b5f82403aff799584f3cb. Closes: https://bugs.gentoo.org/976784 Signed-off-by: Violet Purcell Part-of: https://codeberg.org/gentoo/gentoo/pulls/1087 Signed-off-by: Sam James --- sys-kernel/scx/scx-1.1.1.ebuild | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys-kernel/scx/scx-1.1.1.ebuild b/sys-kernel/scx/scx-1.1.1.ebuild index 09e6a71f0f1c3..2fb463a27e789 100644 --- a/sys-kernel/scx/scx-1.1.1.ebuild +++ b/sys-kernel/scx/scx-1.1.1.ebuild @@ -3,9 +3,11 @@ EAPI=8 +LLVM_COMPAT=( {16..21} ) + RUST_MIN_VER="1.88.0" -inherit cargo linux-info +inherit cargo llvm-r2 linux-info DESCRIPTION="sched_ext schedulers and tools" HOMEPAGE="https://github.com/sched-ext/scx" @@ -40,7 +42,9 @@ BDEPEND=" app-misc/jq dev-libs/protobuf[protoc(+)] >=dev-util/bpftool-7.5.0 - >=llvm-core/clang-17[llvm_targets_BPF(-)] + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT}=[llvm_targets_BPF(-)] + ') " PDEPEND="~sys-kernel/scx-loader-${PV}" @@ -61,9 +65,15 @@ QA_PREBUILT="/usr/bin/vmlinux_docify" pkg_setup() { linux-info_pkg_setup + llvm-r2_pkg_setup rust_pkg_setup } +src_compile() { + local -x BPF_CLANG=clang-${LLVM_SLOT} + cargo_src_compile +} + src_test() { # Skip broken tests in scx_mitosis and scx_utils # Upstream: https://github.com/sched-ext/scx/issues/3418