From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/bpf-toolchain/
Date: Thu, 15 Aug 2024 22:18:01 +0000 (UTC) [thread overview]
Message-ID: <1723760253.9c908753edf4523644b47779bc3d9894d247e69c.sam@gentoo> (raw)
commit: 9c908753edf4523644b47779bc3d9894d247e69c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 15 22:15:10 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> 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 <sam <AT> 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 @@
<email>toolchain@gentoo.org</email>
<name>Gentoo Toolchain Project</name>
</maintainer>
+ <use>
+ <flag name="bin-symlinks">
+ Symlink executables to usr/bin to be in default
+ PATH (conflicts with crossdev bpf, and crossdev
+ is preferable for a fully featured toolchain)
+ </flag>
+ </use>
<upstream>
<remote-id type="cpe">cpe:/a:gnu:gcc</remote-id>
<remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>
next reply other threads:[~2024-08-15 22:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-15 22:18 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-08 11:07 [gentoo-commits] repo/gentoo:master commit in: sys-devel/bpf-toolchain/ Sam James
2025-01-05 13:40 WANG Xuerui
2024-12-09 12:36 Arthur Zamarin
2024-11-02 10:00 Arthur Zamarin
2024-09-12 14:58 Sam James
2024-09-09 20:44 Arthur Zamarin
2024-09-09 13:46 Sam James
2024-09-08 21:59 Sam James
2024-08-31 6:39 Sam James
2024-08-23 13:00 Arthur Zamarin
2024-08-20 19:00 Sam James
2024-08-19 19:22 Sam James
2024-08-19 17:33 Sam James
2024-08-19 17:33 Sam James
2024-08-19 13:50 Jakov Smolić
2024-08-19 12:40 Arthur Zamarin
2024-08-19 12:40 Arthur Zamarin
2024-08-19 10:51 Arthur Zamarin
2024-08-19 10:44 Arthur Zamarin
2024-08-19 8:42 Sam James
2024-08-16 0:39 Sam James
2024-08-15 23:47 Sam James
2024-08-15 23:47 Sam James
2024-08-07 2:53 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1723760253.9c908753edf4523644b47779bc3d9894d247e69c.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox