Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 730032

Summary: emerge --info prints about gcc and GNU ld while CC and LD point to something else
Product: Portage Development Reporter: Agostino Sarubbo <ago>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---

Description Agostino Sarubbo gentoo-dev 2020-06-28 13:14:39 UTC
my CC is clang and my LD is ld.lld, emerge --info says:

Portage 2.3.103 (python 3.7.7-final-0, default/linux/amd64/17.1, gcc-10.1.0, glibc-2.31-r5, 5.4.0-1015-aws x86_64)

ld GNU ld (Gentoo 2.34 p4) 2.34.0
Comment 1 Arfrever Frehtes Taifersar Arahesis 2020-06-29 15:23:49 UTC
${LD} is rarely used. For most packages, linker is called through compiler and selected by -fuse-ld=... in ${LDFLAGS}.

Information about active version of gcc and binutils is still useful.
It could be shown using some special formatting in list of packages shown slightly below in output of `emerge --info`.
Example with << >> around versions:
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo, <<2.34-r1::gentoo>>
sys-devel/gcc:            8.4.0-r1::gentoo, <<9.3.0-r1::gentoo>>, 10.1.0-r1::gentoo

It should not be only colors, because colors would be lost when users copy output to bugzilla.

After above change is implemented, gcc version in first line could be dropped.

Line starting with "ld " is actually for /usr/bin/ld, not ${LD}. Information about version in this line would be redundant, but information about BFD linker versus GOLD linker could be still useful. (sys-devel/binutils has "default-gold" USE flag, which affects /usr/bin/ld.)

(For ${CC}, ${LD} etc., see bug #722456.)
(For LLVM toolchain, see bug #730152.)
Comment 2 Arfrever Frehtes Taifersar Arahesis 2020-06-29 15:31:22 UTC
Maybe `ld --version` can be parsed, and information about linker shown as one of the following
/usr/bin/ld: BFD
/usr/bin/ld: GOLD
/usr/bin/ld: LLD