commit: 53d1b62c00f7a1b4be97077e1b5d0e01ec397c7e Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com> AuthorDate: Sat May 3 14:27:21 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat May 3 19:38:52 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53d1b62c
dev-util/bpftool: warn when using bpf-toolchain While using bpf-toolchain "mostly works", there are still some rough edges due to ongoing work in Linux and gcc itself. Make users aware that USE=-clang might result in bugs. Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com> Part-of: https://github.com/gentoo/gentoo/pull/41913 Closes: https://github.com/gentoo/gentoo/pull/41913 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-util/bpftool/bpftool-7.5.0-r1.ebuild | 5 +++++ dev-util/bpftool/bpftool-9999.ebuild | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/dev-util/bpftool/bpftool-7.5.0-r1.ebuild b/dev-util/bpftool/bpftool-7.5.0-r1.ebuild index e35ec289b5ca..2d8c0adfad31 100644 --- a/dev-util/bpftool/bpftool-7.5.0-r1.ebuild +++ b/dev-util/bpftool/bpftool-7.5.0-r1.ebuild @@ -94,6 +94,11 @@ src_prepare() { sed -i 's/-fno-stack-protector/& -std=gnu11/g' src/Makefile || die if ! use clang; then + # make people aware of what they are doing + ewarn "Using bpf-toolchain instead of clang due to USE=-clang." + ewarn "Please report any odd behaviours you observe, since using gcc for BPF" + ewarn "is still under development in both the Linux kernel and gcc itself." + # prevent attribute warning about preserve_access_index # since gcc does not support '#pragma clang attribute push': # https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=675b4e2 diff --git a/dev-util/bpftool/bpftool-9999.ebuild b/dev-util/bpftool/bpftool-9999.ebuild index 3658c8d318bd..0139c6ee78d9 100644 --- a/dev-util/bpftool/bpftool-9999.ebuild +++ b/dev-util/bpftool/bpftool-9999.ebuild @@ -92,6 +92,11 @@ src_prepare() { sed -i 's/-fno-stack-protector/& -std=gnu11/g' src/Makefile || die if ! use clang; then + # make people aware of what they are doing + ewarn "Using bpf-toolchain instead of clang due to USE=-clang." + ewarn "Please report any odd behaviours you observe, since using gcc for BPF" + ewarn "is still under development in both the Linux kernel and gcc itself." + # prevent attribute warning about preserve_access_index # since gcc does not support '#pragma clang attribute push': # https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=675b4e2
