Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 899080 - sys-devel/llvm[binutils-plugin] does not strictly require sys-devel/binutils
Summary: sys-devel/llvm[binutils-plugin] does not strictly require sys-devel/binutils
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-03 16:27 UTC by Violet Purcell
Modified: 2023-03-11 05:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Violet Purcell 2023-03-03 16:27:06 UTC
Currently, the ebuild for sys-devel/llvm will pull in sys-devel/binutils if the binutils-plugin USE flag is enabled. However, the LLVM binutils plugin only requires the plugin-api.h header to build, which is provided by sys-libs/binutils-libs. I'm currently using the mold linker which requires LLVMgold.so for LTO support, and it's working perfectly without binutils, so as far as I can tell there aren't any runtime issues.

Reproducible: Always
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-03-10 15:00:45 UTC
I'm sorry but I'm not sure if I understand you correctly: did you verify that it builds fine with only binutils-libs installed and no binutils at all?  The dependency predates introduction of binutils-libs, so it is understandable it may be outdated.
Comment 2 Violet Purcell 2023-03-10 20:17:50 UTC
(In reply to Michał Górny from comment #1)
> I'm sorry but I'm not sure if I understand you correctly: did you verify
> that it builds fine with only binutils-libs installed and no binutils at
> all?  The dependency predates introduction of binutils-libs, so it is
> understandable it may be outdated.

Yes, it built and worked successfully on my machine with only binutils-libs installed and no binutils, since as far as I can tell the only thing required for LLVMgold.so to build is the plugin-api.h header (which is provided by binutils-libs).
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-03-11 04:55:19 UTC
Now that I look at it, we already have DEPEND on binutils-libs.  I suppose the RDEPEND was supposed to mean "binutils will load our plugin" but I guess enforcing this doesn't justify the costs.
Comment 4 Larry the Git Cow gentoo-dev 2023-03-11 05:25:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ef5d597cab485d25c7fcf9733a329daab4ad07e

commit 0ef5d597cab485d25c7fcf9733a329daab4ad07e
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2023-03-11 04:57:14 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2023-03-11 04:57:14 +0000

    sys-devel/llvm: Remove explicit RDEPEND on binutils
    
    Remove the explicit RDEPEND on sys-devel/binutils[plugins].  Unless
    I'm mistaken, this dependency was supposed to guarantee that binutils
    will load LLVMgold.so plugin and therefore its tool will be able to
    process archives containing LLVM bytecode.  However, it has a side
    effect of installing binutils on binutils-free systems.
    
    Closes: https://bugs.gentoo.org/899080
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-devel/llvm/llvm-14.0.6-r2.ebuild          | 1 -
 sys-devel/llvm/llvm-15.0.7.ebuild             | 1 -
 sys-devel/llvm/llvm-16.0.0.9999.ebuild        | 1 -
 sys-devel/llvm/llvm-16.0.0_rc3.ebuild         | 1 -
 sys-devel/llvm/llvm-17.0.0.9999.ebuild        | 1 -
 sys-devel/llvm/llvm-17.0.0_pre20230304.ebuild | 1 -
 6 files changed, 6 deletions(-)