From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2B3FC15852A for ; Thu, 15 Aug 2024 22:18:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4AB2AE29AC; Thu, 15 Aug 2024 22:18:04 +0000 (UTC) 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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 27BA9E29AC for ; Thu, 15 Aug 2024 22:18:04 +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 1AC74343017 for ; Thu, 15 Aug 2024 22:18:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 80D211EBA for ; Thu, 15 Aug 2024 22:18:01 +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: <1723760253.9c908753edf4523644b47779bc3d9894d247e69c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/bpf-toolchain/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/bpf-toolchain/bpf-toolchain-14.2.0-r1.ebuild sys-devel/bpf-toolchain/bpf-toolchain-14.2.0.ebuild sys-devel/bpf-toolchain/metadata.xml X-VCS-Directories: sys-devel/bpf-toolchain/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 9c908753edf4523644b47779bc3d9894d247e69c X-VCS-Branch: master Date: Thu, 15 Aug 2024 22:18:01 +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: e0968fc8-ee8a-4c26-a7aa-08572aec4fba X-Archives-Hash: 8cbafa739b28536895cf6ede0ae40e25 commit: 9c908753edf4523644b47779bc3d9894d247e69c Author: Sam James gentoo org> AuthorDate: Thu Aug 15 22:15:10 2024 +0000 Commit: Sam James gentoo org> CommitDate: Thu Aug 15 22:17:33 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c908753 sys-devel/bpf-toolchain: add USE=bin-symlinks Note that unlike dev-util/mingw64-toolchain, we're enabling it by default because it'll be pretty uncommon for anyone to have a crossdev-built toolchain for it. This is needed to avoid conflicts if someone wants to build a bpf-unknown-none toolchain via crossdev where an ebuild depends on bpf-toolchain (wouldn't be possible before because of file conflicts). Also, with it off by default, we would have to add some hacks in e.g. the systemd ebuild to make it work by mangling PATH and things get tricky there especially given only a small part of the build would even use it. May change mind on this later if needed though. Signed-off-by: Sam James gentoo.org> ...n-14.2.0.ebuild => bpf-toolchain-14.2.0-r1.ebuild} | 19 ++++++++++++++++--- sys-devel/bpf-toolchain/metadata.xml | 7 +++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0.ebuild b/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0-r1.ebuild similarity index 92% rename from sys-devel/bpf-toolchain/bpf-toolchain-14.2.0.ebuild rename to sys-devel/bpf-toolchain/bpf-toolchain-14.2.0-r1.ebuild index aba05ad111a3..0c5a58f41988 100644 --- a/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0.ebuild +++ b/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0-r1.ebuild @@ -41,8 +41,8 @@ LICENSE=" " SLOT="0" KEYWORDS="-* ~amd64" -# TODO: USE=strip, USE=bin-symlinks from dev-util/mingw64-toolchain -IUSE="custom-cflags" +# TODO: USE=strip from dev-util/mingw64-toolchain? +IUSE="+bin-symlinks custom-cflags" RDEPEND=" dev-libs/gmp:= @@ -50,6 +50,10 @@ RDEPEND=" dev-libs/mpfr:= sys-libs/zlib:= virtual/libiconv + bin-symlinks? ( + !cross-bpf-unknown-none/binutils + !cross-bpf-unknown-none/gcc + ) " DEPEND="${RDEPEND}" @@ -81,7 +85,8 @@ src_compile() { CTARGET=bpf-unknown-none BPFT_D=${T}/root # moved to ${D} in src_install - local prefix=${EPREFIX}/usr + local bpftdir=/usr/lib/${PN} + local prefix=${EPREFIX}${bpftdir} local sysroot=${BPFT_D}${prefix} local -x PATH=${sysroot}/bin:${PATH} @@ -177,6 +182,14 @@ src_compile() { bpft-build binutils bpft-build gcc + if use bin-symlinks; then + mkdir -p -- "${BPFT_D}${EPREFIX}"/usr/bin/ || die + local bin + for bin in "${sysroot}"/bin/*; do + ln -rs -- "${bin}" "${BPFT_D}${EPREFIX}"/usr/bin/ || die + done + fi + # Delete libdep.a, which has a colliding name and is useless for bpf, # which does not make use of cross-library dependencies: the libdep.a # for the native binutils will do. diff --git a/sys-devel/bpf-toolchain/metadata.xml b/sys-devel/bpf-toolchain/metadata.xml index 12065082990f..34b44dd721cd 100644 --- a/sys-devel/bpf-toolchain/metadata.xml +++ b/sys-devel/bpf-toolchain/metadata.xml @@ -5,6 +5,13 @@ toolchain@gentoo.org Gentoo Toolchain Project + + + Symlink executables to usr/bin to be in default + PATH (conflicts with crossdev bpf, and crossdev + is preferable for a fully featured toolchain) + + cpe:/a:gnu:gcc cpe:/a:gnu:binutils