Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 436294 - emerge --info should report which linker is in use
Summary: emerge --info should report which linker is in use
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2012-09-26 13:10 UTC by Julian Ospald
Modified: 2015-10-26 01:28 UTC (History)
2 users (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 Julian Ospald 2012-09-26 13:10:22 UTC
It happens quite frequently that people report bugs that cannot be reproduced by any1 until someone finds out that he was/is using ld.gold.

ld.gold has different behavior for as-needed, does not permit underlinking, is known to cause problems on some packages and so forth, so having that information in "emerge --info" would really make life easier

example bug 435826
Comment 1 Zac Medico gentoo-dev 2012-09-26 16:24:01 UTC
Should we parse the output of `ld --version` or what?
Comment 2 SpanKY gentoo-dev 2012-09-26 16:30:37 UTC
`${CHOST}-ld --version | head -1` and `${CC:-${CHOST}-gcc} --version | head -1`
Comment 3 Fabian Groffen gentoo-dev 2012-09-26 16:41:49 UTC
(In reply to comment #2)
> `${CHOST}-ld --version | head -1` and `${CC:-${CHOST}-gcc} --version | head
> -1`

can we make that `${CHOST}-ld -v |& head -n1`?

% ld --version | head -1
ld: unknown option: --version
% ld -v |& head -n1
@(#)PROGRAM:ld  PROJECT:ld64-128.2 (Gentoo binutils-apple-4.3)
Comment 4 SpanKY gentoo-dev 2012-09-26 18:32:27 UTC
using --version rather than -v for both is fine.  if the selected tool doesn't support --version, then screw em.
Comment 6 Fabian Groffen gentoo-dev 2012-10-26 17:50:08 UTC
can we use the output of 

  gcc --print-prog-name=ld

and fall back to ${CHOST}-ld if that doesn't return anything?
Comment 7 Fabian Groffen gentoo-dev 2012-10-26 17:51:28 UTC
s/gcc/$CC/ or how else we correctly find the compiler in use
Comment 8 Zac Medico gentoo-dev 2012-10-26 20:09:10 UTC
(In reply to comment #5)
> This is fixed in git:
> 
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;
> h=4126fcfb04efcedaf857b0f6977effb82c24e1cb

This is in portage 2.1.11.31 and 2.2.0_alpha142.

(In reply to comment #7)
> s/gcc/$CC/ or how else we correctly find the compiler in use

I'll wait and see what toolchain people say.
Comment 9 SpanKY gentoo-dev 2012-11-18 08:30:22 UTC
(In reply to comment #6)

that won't work if $LD is set i think
Comment 10 Julian Ospald 2013-11-25 15:03:47 UTC
can we close this?