commit: b65390555d292123bc6b2793cc8fd84f373e58ea Author: Michal Rostecki <vadorovsky <AT> protonmail <DOT> com> AuthorDate: Wed Oct 22 14:37:42 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Fri Oct 24 09:31:57 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6539055
dev-util/bpf-linker: Fix build for libc++ llvm-sys[0] by default tries to link to libstc++ and any alternative linker needs to be mentioned in the `LLVM_SYS_LIBCPP` environment variable. [0] https://crates.io/crates/llvm-sys Closes: https://bugs.gentoo.org/965011 Signed-off-by: Michal Rostecki <vadorovsky <AT> protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/44296 Closes: https://github.com/gentoo/gentoo/pull/44296 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-util/bpf-linker/bpf-linker-0.9.15-r1.ebuild | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev-util/bpf-linker/bpf-linker-0.9.15-r1.ebuild b/dev-util/bpf-linker/bpf-linker-0.9.15-r1.ebuild index 013ded64afd2..b6916cd4f94b 100644 --- a/dev-util/bpf-linker/bpf-linker-0.9.15-r1.ebuild +++ b/dev-util/bpf-linker/bpf-linker-0.9.15-r1.ebuild @@ -15,7 +15,7 @@ declare -A GIT_CRATES=( LLVM_COMPAT=( {20..21} ) RUST_REQ_USE="llvm_targets_BPF(+),rust_sysroots_bpf(-)" -inherit cargo llvm-r2 +inherit cargo llvm-r2 toolchain-funcs DESCRIPTION="Simple BPF static linker" HOMEPAGE="https://github.com/aya-rs/bpf-linker/" @@ -72,4 +72,8 @@ src_configure() { cargo_src_configure --no-default-features export "LLVM_SYS_${LLVM_SLOT}1_PREFIX"="$(get_llvm_prefix -d)" + + if [[ $(tc-get-cxx-stdlib) == "libc++" ]]; then + export LLVM_SYS_LIBCPP=c++ + fi }
