Summary: | sys-devel/binutils resets linker to ld.bfd on emerge | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marcin Mirosław <bug> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander, herrtimson |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=668462 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Marcin Mirosław
2014-01-02 13:41:19 UTC
confirm! same here after (re)install binutils. (In reply to Alex Turbov from comment #1) > confirm! same here after (re)install binutils. root@gentop〉.../x86_64-pc-linux-gnu/binutils-bin/2.24〉ll ld* -rwxr-xr-x 2 root root 832K Jan 5 20:21 ld -rwxr-xr-x 2 root root 832K Jan 5 20:21 ld.bfd -rwxr-xr-x 1 root root 3,5M Jan 5 20:21 ld.gold toolchain-binutils.eclass is being phased out. However, I suspect this bug is still present in current binutils anyway... Needs research. I guess the problem here is that binutils-config does not persist user's choice anywhere and just tweaks symlinks installed by binutils-config itself. There are a few ways to do it: 1. infer it from existing installed symlinks, a bit fragile 2. store users' preference separately somewhere in /etc/env.d or /var/ 3. phase out binutils-config --linker support in favour of another mechanism, like binutils's --enable-gold=default set via USE-flag. Most people testing gold linker will likely have added ECONF_EXTRA="--enable-gold=default" to package.env for binutils itself, so if you're willing to add a compile switch based on a useflag, that mimics best practice anyway. I didn't realize we have a wiki page that advises package.env: https://wiki.gentoo.org/wiki/Gold It should certainly be a use flag. It's the only sensible thing to do, because if you want to test and doing an emerge @system after changing linker with binutils-config, well, binutils gets merged and resets itself to ld.bfd It might be possible to solve this via binutils-config, but as long as there is the compile switch and a possible useflag, it might not be that pressing of an issue. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcf3b906fdf9380837d462e56aca0da1f2388f2c commit bcf3b906fdf9380837d462e56aca0da1f2388f2c Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-02-12 23:01:16 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-02-12 23:01:33 +0000 sys-devel/binutils: add USE=default-gold, bug #496760 binutils allows you to set ld=ld.bfd (default) and ld=ld.gold. Expose this override as USE=default-gold. Reported-by: Marcin Mirosław Bug: https://bugs.gentoo.org/496760 Package-Manager: Portage-2.3.60, Repoman-2.3.12 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/binutils/binutils-2.31.1-r3.ebuild | 8 ++++++-- sys-devel/binutils/binutils-9999.ebuild | 5 ++++- sys-devel/binutils/metadata.xml | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) After emerging binutils-2.31.1-r3 with default-gold flag it still appears in my case that i need to reset to gold using binutils-config, despite having /etc/portage/env/gold.conf. While sys-devel/binutils-2.31.1-r4 is skipped due to a dependency conflict. sys-devel/binutils:2.31 (sys-devel/binutils-2.31.1-r4:2.31/2.31::gentoo, ebuild scheduled for merge) conflicts with >=sys-devel/binutils-2.22:*[cxx] required by (sys-devel/llvm-7.0.1:7/7::gentoo, installed) |