| Summary: | toolchain.eclass: BDEPEND should be used for EAPI=7 | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | David Michael <fedora.dm0> |
| Component: | Eclasses | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | jstein |
| Priority: | Normal | Keywords: | PATCH |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
Patch toolchain.eclass from Git
Patch binutils from Git |
||
|
Description
David Michael
2019-11-21 18:50:49 UTC
Single bug is fine. Would you like to write a patch as well? No need to handle everything in one go. We can do it in a few steps. For binutils I suggest starting from binutils-9999.ebuild and not retrofit the changes to rest of ebuilds. For toolchain.eclass it should be fine to change EAPI=7 behaviour. For binutils, I tested the following. (The 2.33.1 ebuild only differs from 9999 in the patchset and keywords.)
--- sys-devel/binutils/binutils-2.33.1.ebuild
+++ sys-devel/binutils/binutils-2.33.1.ebuild
@@ -73,7 +73,8 @@
>=sys-devel/binutils-config-3
sys-libs/zlib
"
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
doc? ( sys-apps/texinfo )
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
For the eclass, I did something similar, but I ignored later dependencies that only apply to ROOT=/ for GCJ since the feature is not supported by any GCC versions using EAPI=7.
--- eclass/toolchain.eclass
+++ eclass/toolchain.eclass
@@ -225,7 +225,8 @@
fi
fi
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
>=sys-devel/bison-1.875
>=sys-devel/flex-2.5.4
nls? ( sys-devel/gettext )
@@ -233,6 +234,7 @@ DEPEND="${RDEPEND}
>=dev-util/dejagnu-1.4.4
>=sys-devel/autogen-5.5.4
)"
+[[ ${EAPI:-0} == [0-6]* ]] && DEPEND+=" ${BDEPEND}"
if tc_has_feature gcj ; then
GCJ_DEPS=">=media-libs/libart_lgpl-2.1"
It seems to work as expected for the latest versions of binutils and GCC when building native compilers, cross-compilers, and cross-compiled compilers with the affected USE flags enabled. I haven't tried to build other versions yet.
Created attachment 617492 [details, diff]
Patch toolchain.eclass from Git
Created attachment 617494 [details, diff]
Patch binutils from Git
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7781e2cb04272163e94521c2275027b8b2be0251 commit 7781e2cb04272163e94521c2275027b8b2be0251 Author: David Michael <fedora.dm0@gmail.com> AuthorDate: 2020-03-08 15:45:06 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-03-09 21:00:36 +0000 sys-devel/binutils: move deps to BDEPEND for EAPI 7 Tweak only latest ~arch binutils-2.34. Bug: https://bugs.gentoo.org/700898 Signed-off-by: David Michael <fedora.dm0@gmail.com> Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/binutils/binutils-2.34.ebuild | 3 ++- sys-devel/binutils/binutils-9999.ebuild | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) Thanks for applying the binutils part. I didn't think about sys-libs/binutils-libs originally since it isn't part of the compiler toolchain, but should it also move gettext to BDEPEND for consistency? (In reply to David Michael from comment #6) > Thanks for applying the binutils part. I didn't think about > sys-libs/binutils-libs originally since it isn't part of the compiler > toolchain, but should it also move gettext to BDEPEND for consistency? Yeah, that would make sense for both sys-libs/binutils-libs and sys-devel/binutils-hppa64. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4acf595771eaaceb14050a938f8e038c90149c15 commit 4acf595771eaaceb14050a938f8e038c90149c15 Author: David Michael <fedora.dm0@gmail.com> AuthorDate: 2020-03-08 15:33:19 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-03-09 23:57:20 +0000 toolchain.eclass: move --build dependencies to BDEPEND This allows cross-compiling comilers with a much smaller dependency set. Bug: https://bugs.gentoo.org/700898 Signed-off-by: David Michael <fedora.dm0@gmail.com> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> eclass/toolchain.eclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=439800fb8cc9b5b95f163a6329bbfe9a587ba7a7 commit 439800fb8cc9b5b95f163a6329bbfe9a587ba7a7 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-03-10 00:05:17 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-03-10 00:05:33 +0000 sys-libs/binutils-libs: move deps to BDEPEND for EAPI 7, bug #700898 Tweak only latest ~arch binutils-libs-2.34. While at it dropped outdated blocker against gdb-7.10. Reported-by: David Michael Bug: https://bugs.gentoo.org/700898 Package-Manager: Portage-2.3.93, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-libs/binutils-libs/binutils-libs-2.34.ebuild | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=854abca0bdecb5efc0627aeb99f9f3e8299d8d65 commit 854abca0bdecb5efc0627aeb99f9f3e8299d8d65 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-03-10 00:01:07 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-03-10 00:05:33 +0000 sys-devel/binutils-hppa64: move deps to BDEPEND for EAPI 7, bug #700898 Tweak only latest ~arch binutils-hppa64-2.34. Reported-by: David Michael Bug: https://bugs.gentoo.org/700898 Package-Manager: Portage-2.3.93, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/binutils-hppa64/binutils-hppa64-2.34.ebuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Both gcc and binutils-* should be sorted now. Thank you for the report and fixes! |