summaryrefslogtreecommitdiff
path: root/dev-util
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/bpf-linker/bpf-linker-0.9.14-r1.ebuild87
-rw-r--r--dev-util/bpf-linker/bpf-linker-0.9.14.ebuild4
-rw-r--r--dev-util/bpf-linker/files/bpf-linker-0.9.14-llvm-21.patch107
-rw-r--r--dev-util/riffdiff/Manifest4
-rw-r--r--dev-util/riffdiff/riffdiff-3.4.1.ebuild (renamed from dev-util/riffdiff/riffdiff-3.3.10.ebuild)4
-rw-r--r--dev-util/sysprof/files/sysprof-48.0-shadowed-variable.patch25
-rw-r--r--dev-util/sysprof/sysprof-48.0-r1.ebuild4
7 files changed, 230 insertions, 5 deletions
diff --git a/dev-util/bpf-linker/bpf-linker-0.9.14-r1.ebuild b/dev-util/bpf-linker/bpf-linker-0.9.14-r1.ebuild
new file mode 100644
index 000000000000..aec93a4d288e
--- /dev/null
+++ b/dev-util/bpf-linker/bpf-linker-0.9.14-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Extra crates required at runtime via rustc-build-sysroot crate.
+# Note: versions are locked in /usr/lib/rust/*/lib/rustlib/src/rust/library/Cargo.lock.
+CRATES="
+ compiler_builtins@0.1.146
+ compiler_builtins@0.1.152
+"
+
+# Implied by crates above.
+RUST_MIN_VER=1.86.0
+RUST_MAX_VER=1.88.0
+
+declare -A GIT_CRATES=(
+ [compiletest_rs]='https://github.com/Manishearth/compiletest-rs;cb121796a041255ae0afcd9c2766bee4ebfd54f0;compiletest-rs-%commit%'
+)
+
+# bpf-linker code specifically requires LLVM 21 right now
+LLVM_COMPAT=( 21 )
+RUST_REQ_USE="llvm_targets_BPF(+),rust-src"
+
+inherit cargo llvm-r2
+
+DESCRIPTION="Simple BPF static linker"
+HOMEPAGE="https://github.com/aya-rs/bpf-linker/"
+SRC_URI="
+ https://github.com/aya-rs/bpf-linker/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+ https://github.com/gentoo-crate-dist/bpf-linker/releases/download/v${PV}/${P}-crates.tar.xz
+ ${CARGO_CRATE_URIS}
+"
+
+LICENSE="|| ( MIT Apache-2.0 )"
+# Dependent crate licenses
+LICENSE+="
+ ISC MIT Unicode-3.0 Unicode-DFS-2016
+ || ( Apache-2.0 Boost-1.0 )
+"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ $(llvm_gen_dep '
+ llvm-core/llvm:${LLVM_SLOT}=[llvm_targets_BPF]
+ ')
+"
+RDEPEND="
+ ${DEPEND}
+ ${RUST_DEPEND}
+"
+BDEPEND="
+ test? (
+ dev-util/btfdump
+ )
+"
+
+QA_FLAGS_IGNORED=/usr/bin/bpf-linker
+
+pkg_setup() {
+ rust_pkg_setup
+}
+
+src_prepare() {
+ local PATCHES=(
+ # https://github.com/aya-rs/bpf-linker/pull/289
+ "${FILESDIR}/${P}-llvm-21.patch"
+ )
+
+ default
+
+ # replace upstream crate substitution with our crate substitution, sigh
+ local ct_dep=$(grep ^compiletest_rs "${ECARGO_HOME}"/config.toml || die)
+ sed -i -e "/compiletest_rs/s;^.*$;${ct_dep};" Cargo.toml || die
+}
+
+src_configure() {
+ cargo_src_configure --no-default-features
+
+ # note: this needs to be updated to match llvm crate version
+ export LLVM_SYS_201_PREFIX="$(get_llvm_prefix -d)"
+ # the package requires BPF target that is only available in nightly
+ export RUSTC_BOOTSTRAP=1
+}
diff --git a/dev-util/bpf-linker/bpf-linker-0.9.14.ebuild b/dev-util/bpf-linker/bpf-linker-0.9.14.ebuild
index 6a45933edf07..6db0f0953d91 100644
--- a/dev-util/bpf-linker/bpf-linker-0.9.14.ebuild
+++ b/dev-util/bpf-linker/bpf-linker-0.9.14.ebuild
@@ -18,8 +18,8 @@ declare -A GIT_CRATES=(
[compiletest_rs]='https://github.com/Manishearth/compiletest-rs;cb121796a041255ae0afcd9c2766bee4ebfd54f0;compiletest-rs-%commit%'
)
-# https://crates.io/crates/llvm-sys#llvm-compatibility
-LLVM_COMPAT=( {20..21} )
+# this version of bpf-linker is incompatible with changes in LLVM 21
+LLVM_COMPAT=( 20 )
RUST_REQ_USE="llvm_targets_BPF(+),rust-src"
inherit cargo llvm-r2
diff --git a/dev-util/bpf-linker/files/bpf-linker-0.9.14-llvm-21.patch b/dev-util/bpf-linker/files/bpf-linker-0.9.14-llvm-21.patch
new file mode 100644
index 000000000000..b8ef3f72cc31
--- /dev/null
+++ b/dev-util/bpf-linker/files/bpf-linker-0.9.14-llvm-21.patch
@@ -0,0 +1,107 @@
+From b1e6dcd3c8a75489329707709a14403e247e0fa0 Mon Sep 17 00:00:00 2001
+From: Michal Rostecki <vadorovsky@disroot.org>
+Date: Thu, 14 Aug 2025 13:36:12 +0200
+Subject: [PATCH 2/3] di: Update operand indices
+
+Operand indices in `DIType` and all children types were moved starting
+from LLVM 21[0].
+
+[0] llvm/llvm-project@3b90597c2ceaae86608214f6b62b43e55823102b
+---
+ src/llvm/types/di.rs | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/llvm/types/di.rs b/src/llvm/types/di.rs
+index 76757cb1..c44252f0 100644
+--- a/src/llvm/types/di.rs
++++ b/src/llvm/types/di.rs
+@@ -150,8 +150,8 @@ impl<'ctx> From<DIDerivedType<'ctx>> for DIType<'ctx> {
+ #[repr(u32)]
+ enum DIDerivedTypeOperand {
+ /// [`DIType`] representing a base type of the given derived type.
+- /// [Reference in LLVM code](https://github.com/llvm/llvm-project/blob/llvmorg-17.0.3/llvm/include/llvm/IR/DebugInfoMetadata.h#L1032).
+- BaseType = 3,
++ /// [Reference in LLVM code](https://github.com/llvm/llvm-project/blob/llvmorg-21.1.0-rc3/llvm/include/llvm/IR/DebugInfoMetadata.h#L1386).
++ BaseType = 5,
+ }
+
+ /// Represents the debug information for a derived type in LLVM IR.
+@@ -212,8 +212,8 @@ impl DIDerivedType<'_> {
+ #[repr(u32)]
+ enum DICompositeTypeOperand {
+ /// Elements of the composite type.
+- /// [Reference in LLVM code](https://github.com/llvm/llvm-project/blob/llvmorg-17.0.3/llvm/include/llvm/IR/DebugInfoMetadata.h#L1230).
+- Elements = 4,
++ /// [Reference in LLVM code](https://github.com/llvm/llvm-project/blob/llvmorg-21.1.0-rc3/llvm/include/llvm/IR/DebugInfoMetadata.h#L1813).
++ Elements = 6,
+ }
+
+ /// Represents the debug info for a composite type in LLVM IR.
+
+From 9668fb5b6f9497a598de920a218d28d57b3e1917 Mon Sep 17 00:00:00 2001
+From: Michal Rostecki <vadorovsky@disroot.org>
+Date: Thu, 14 Aug 2025 14:20:20 +0200
+Subject: [PATCH 3/3] fix: Do not expect strictly sequential order when not
+ necessary
+
+We've noticed that ordering is different on different environments.
+Let's relax the check with `CHECK-DAG`. What matters is that all
+expected names/instructions are present.
+---
+ tests/assembly/di_generics.rs | 6 +++---
+ tests/assembly/ignore-inline-never.rs | 4 ++--
+ tests/btf/assembly/exported-symbols.rs | 8 ++++----
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/tests/assembly/di_generics.rs b/tests/assembly/di_generics.rs
+index 08282d4c..0ec5a749 100644
+--- a/tests/assembly/di_generics.rs
++++ b/tests/assembly/di_generics.rs
+@@ -63,6 +63,6 @@ pub fn my_function<T: Add<Output = T> + Copy>(x: T, y: T) -> T {
+ .add(y)
+ }
+
+-// CHECK: name: "Foo_3C_u32_3E_"
+-// CHECK: name: "Bar_3C_di_generics_3A__3A_Foo_3C_u32_3E__3E_"
+-// CHECK: name: "my_function_3C_u32_3E_"
++// CHECK-DAG: name: "Foo_3C_u32_3E_"
++// CHECK-DAG: name: "Bar_3C_di_generics_3A__3A_Foo_3C_u32_3E__3E_"
++// CHECK-DAG: name: "my_function_3C_u32_3E_"
+diff --git a/tests/assembly/ignore-inline-never.rs b/tests/assembly/ignore-inline-never.rs
+index 58a8e583..02bdbc25 100644
+--- a/tests/assembly/ignore-inline-never.rs
++++ b/tests/assembly/ignore-inline-never.rs
+@@ -21,6 +21,6 @@ fn actually_inlined(a: u64) -> u64 {
+ pub extern "C" fn fun(a: u64) -> u64 {
+ // CHECK-LABEL: fun:
+ actually_inlined(a)
+- // CHECK: r{{[0-9]}} = r{{[0-9]}}
+- // CHECK-NEXT: r{{[0-9]}} += 42
++ // CHECK-DAG: r{{[0-9]}} = r{{[0-9]}}
++ // CHECK-DAG: r{{[0-9]}} += 42
+ }
+diff --git a/tests/btf/assembly/exported-symbols.rs b/tests/btf/assembly/exported-symbols.rs
+index a5b99bf0..921b2e68 100644
+--- a/tests/btf/assembly/exported-symbols.rs
++++ b/tests/btf/assembly/exported-symbols.rs
+@@ -35,7 +35,7 @@ fn inline_function_2(v: u8) -> u8 {
+ }
+
+ // #[no_mangle] functions keep linkage=global
+-// CHECK: <FUNC> 'local_no_mangle' --> global [{{[0-9]+}}
++// CHECK-DAG: <FUNC> 'local_no_mangle' --> global [{{[0-9]+}}
+
+ // check that parameter names are preserved
+ // CHECK: <FUNC_PROTO>
+@@ -43,8 +43,8 @@ fn inline_function_2(v: u8) -> u8 {
+ // CHECK-NEXT: _arg2
+
+ // public functions get static linkage
+-// CHECK: <FUNC> '{{.*}}local_public{{.*}}' --> static
+-// CHECK: <FUNC> '{{.*}}dep_public_symbol{{.*}}' --> static
++// CHECK-DAG: <FUNC> '{{.*}}local_public{{.*}}' --> static
++// CHECK-DAG: <FUNC> '{{.*}}dep_public_symbol{{.*}}' --> static
+
+ // #[no_mangle] is honored for dep functions
+-// CHECK: <FUNC> 'dep_no_mangle' --> global
++// CHECK-DAG: <FUNC> 'dep_no_mangle' --> global
diff --git a/dev-util/riffdiff/Manifest b/dev-util/riffdiff/Manifest
index 9ef17d52c36b..049e068bcfaa 100644
--- a/dev-util/riffdiff/Manifest
+++ b/dev-util/riffdiff/Manifest
@@ -1,4 +1,4 @@
-DIST riffdiff-3.3.10-crates.tar.xz 13527988 BLAKE2B 3870d93e918c2522ebe616a79fbf504a1c82b873bee8cdcfd6832de61d184e55680c30bc4a043f640a5b854bc5b9e36c95c489a74ae0509d059b653f65a44711 SHA512 d02b8d951dca3081687cfa8fa05656c8d5f6afbbd454049bafa4d76a58735e684511f79b2b2f06c85cfe73218622e8d2da9ffddf4b1cc7c9e54b500c5b983c80
-DIST riffdiff-3.3.10.tar.gz 2174200 BLAKE2B 962150b68e6f17ffd24ea477a3dcfc5d9c9e604fd9dda4ad7428b616ec3c0036f81f259ef2cc9c756da59c387cf16f4323b202df166a1ca44b49b7fa14b700b9 SHA512 96818f969b70f2c819b256a5b160a8dac2047ebb335a24c04267bf7cb5d13cef71077373309848645986e147e630618fddfeb3f43182a4a43828d698e2cfdc42
DIST riffdiff-3.4.0-crates.tar.xz 14391992 BLAKE2B ca755f3c8789666d957660389d45a0c6e9cc8c33df8834a16746165adbb96469c29f75cd691539a505a8b94a06cf1ec838ecd4374f645715bb8bbdd6c807a88a SHA512 56c033bac8d50a00b6c8a27cd460f4131a002ab5add91ce4f5117f0518e489040ba37d75cafccf6f8859c050d1ad0e22243a7e9158bd8eb514b7f6eb7c635749
DIST riffdiff-3.4.0.tar.gz 2074194 BLAKE2B c7b5627d2acf6c4867426d739847a1dd2be6f3b65ea007d440fb7cc952951b455f7bd9e3138197e18db8dff156a9873337bfd8370cc5c3ccee72cb16e3f4f702 SHA512 d6664a2c3959c2855460b8bb15dfcc92ee1a80910d120455ea3e428218c41b158c21d58276158e9c5d3e14039b81541542088eaba479b9012013bfe62a53532a
+DIST riffdiff-3.4.1-crates.tar.xz 14391992 BLAKE2B ca755f3c8789666d957660389d45a0c6e9cc8c33df8834a16746165adbb96469c29f75cd691539a505a8b94a06cf1ec838ecd4374f645715bb8bbdd6c807a88a SHA512 56c033bac8d50a00b6c8a27cd460f4131a002ab5add91ce4f5117f0518e489040ba37d75cafccf6f8859c050d1ad0e22243a7e9158bd8eb514b7f6eb7c635749
+DIST riffdiff-3.4.1.tar.gz 2074368 BLAKE2B 2742eaef9a0243cab4762386b303e3d459bd6ac0f66d8bff997f1f848699f80579c662f7bb222c43c7be068ce50c01df139ebd4257c2cfee5b7f59d12bdf709b SHA512 b7f6e4965c651dbe01da1d1577ce7f2ccc6230045731b2f92aa513baf733678be9b65db18bc4558dda18fd8b7eea9667c6529f155df972f190ae5450ce2d1241
diff --git a/dev-util/riffdiff/riffdiff-3.3.10.ebuild b/dev-util/riffdiff/riffdiff-3.4.1.ebuild
index 214a39898e94..cc8ab5f7f813 100644
--- a/dev-util/riffdiff/riffdiff-3.3.10.ebuild
+++ b/dev-util/riffdiff/riffdiff-3.4.1.ebuild
@@ -6,6 +6,8 @@ EAPI=8
CRATES="
"
+RUST_MIN_VER="1.82.0"
+
inherit cargo
DESCRIPTION="A diff filter highlighting changed line parts"
@@ -17,7 +19,7 @@ S="${WORKDIR}/${P/diff/}"
LICENSE="MIT"
# Autogenerated by pycargoebuild
# Dependent crate licenses
-LICENSE+=" Apache-2.0 BSD-2 BSD MIT Unicode-DFS-2016"
+LICENSE+=" Apache-2.0 BSD-2 BSD MIT Unicode-3.0 Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64"
diff --git a/dev-util/sysprof/files/sysprof-48.0-shadowed-variable.patch b/dev-util/sysprof/files/sysprof-48.0-shadowed-variable.patch
new file mode 100644
index 000000000000..94f6b4fb35a2
--- /dev/null
+++ b/dev-util/sysprof/files/sysprof-48.0-shadowed-variable.patch
@@ -0,0 +1,25 @@
+Compilation with Clang fails on -Werror=shadow: 'environ' shadows declaration from /usr/include/unistd.h
+
+Bug: https://gitlab.gnome.org/GNOME/sysprof/-/issues/150
+--- a/src/sysprof/sysprof-greeter.c
++++ b/src/sysprof/sysprof-greeter.c
+@@ -626,14 +626,14 @@ sysprof_greeter_init (SysprofGreeter *self)
+
+ if (self->recording_template)
+ {
+- g_auto(GStrv) environ = NULL;
++ g_auto(GStrv) environ_ = NULL;
+ g_object_get (self->recording_template,
+- "environ", &environ,
++ "environ", &environ_,
+ NULL);
+- if (environ)
++ if (environ_)
+ {
+- for (guint i = 0; environ[i]; i++)
+- gtk_string_list_append (self->envvars, environ[i]);
++ for (guint i = 0; environ_[i]; i++)
++ gtk_string_list_append (self->envvars, environ_[i]);
+ }
+ }
+
diff --git a/dev-util/sysprof/sysprof-48.0-r1.ebuild b/dev-util/sysprof/sysprof-48.0-r1.ebuild
index 416c439e0795..2819012048c7 100644
--- a/dev-util/sysprof/sysprof-48.0-r1.ebuild
+++ b/dev-util/sysprof/sysprof-48.0-r1.ebuild
@@ -46,6 +46,10 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-48.0-shadowed-variable.patch
+)
+
src_prepare() {
default
xdg_environment_reset