From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C33841584AD for ; Sat, 03 May 2025 19:39:36 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id AB29E343073 for ; Sat, 03 May 2025 19:39:36 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id AC9C711036D; Sat, 03 May 2025 19:39:35 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A28DB11036D for ; Sat, 03 May 2025 19:39:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4FBCE343073 for ; Sat, 03 May 2025 19:39:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AFD2CF18 for ; Sat, 03 May 2025 19:39:33 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1746301131.caf1b774b9b723e622a2b64f68f4cc4769fb1d78.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/bpftool/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/bpftool/bpftool-7.5.0-r1.ebuild dev-util/bpftool/bpftool-9999.ebuild X-VCS-Directories: dev-util/bpftool/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: caf1b774b9b723e622a2b64f68f4cc4769fb1d78 X-VCS-Branch: master Date: Sat, 03 May 2025 19:39:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 70b18a09-0182-4b78-84f7-f5b345fe10e5 X-Archives-Hash: 90aaba562ddb9fe43bd56680d6be58a9 commit: caf1b774b9b723e622a2b64f68f4cc4769fb1d78 Author: Holger Hoffstätte applied-asynchrony com> AuthorDate: Sat May 3 08:12:19 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sat May 3 19:38:51 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=caf1b774 dev-util/bpftool: prevent attribute warning with bpf-toolchain The bpf-generated kernel headers currently use a clang-specific pragma to annotate data structures with the preserve_access_index attribute; since this does not work with gcc, the attribute will be ignored. Luckily the BPF test suite already has a macro guard called BPF_NO_PRESERVE_ACCESS_INDEX for this case, so just define that for the bpftool build as well. Signed-off-by: Holger Hoffstätte applied-asynchrony.com> Part-of: https://github.com/gentoo/gentoo/pull/41913 Signed-off-by: Sam James 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 45d7eba2f7a7..e35ec289b5ca 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 + # 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 + sed -i 's/std=gnu11/& -DBPF_NO_PRESERVE_ACCESS_INDEX/g' src/Makefile || die + # remove bpf target & add assembly annotations to fix CO-RE feature detection sed -i -e 's/-target bpf/-dA/' src/Makefile.feature || die diff --git a/dev-util/bpftool/bpftool-9999.ebuild b/dev-util/bpftool/bpftool-9999.ebuild index 9f08e4d48071..3658c8d318bd 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 + # 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 + sed -i 's/std=gnu11/& -DBPF_NO_PRESERVE_ACCESS_INDEX/g' src/Makefile || die + # remove bpf target & add assembly annotations to fix CO-RE feature detection sed -i -e 's/-target bpf/-dA/' src/Makefile.feature || die