Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658054 - sys-devel/binutils-config-5.1-r1: not accepting ld.lld as a linker
Summary: sys-devel/binutils-config-5.1-r1: not accepting ld.lld as a linker
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 2 votes (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-13 16:31 UTC by Andrzej Korwin-Mikke
Modified: 2020-05-13 23:22 UTC (History)
4 users (show)

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


Attachments
ld.lld legal if supplied as full path (0001-allow-binutils-config-to-use-ld.lld.patch,1.20 KB, patch)
2019-10-19 20:50 UTC, Nicholas Sielicki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrzej Korwin-Mikke 2018-06-13 16:31:28 UTC
Using `binutils-config --linker ld.lld` yields "binutils-config: sorry, but x86_64-pc-linux-gnu-2.30 doesn't support the ld.lld linker"

Reproducible: Always

Steps to Reproduce:
1. Launch binutils-config --linker ld.lld
2. Voila.
Actual Results:  
"ld.lld not supported" error

Expected Results:  
Switching to lld.

emerge --info binutils-config
Portage 2.3.40 (python 3.5.5-final-0, default/linux/amd64/17.0/desktop/gnome/systemd, gcc-7.3.0, glibc-2.27-r3, 4.17.0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.17.0-x86_64-Intel-R-_Core-TM-_i3-6100_CPU_@_3.70GHz-with-gentoo-2.6
KiB Mem:     8106692 total,   2999524 free
KiB Swap:    4194300 total,   4193524 free
Timestamp of repository gentoo: Tue, 12 Jun 2018 15:45:01 +0000
Head commit of repository gentoo: 3b68bc4defc96dcf8f236cd83e7dcbe391af2271
sh bash 4.4_p23
ld GNU gold (Gentoo 2.30 p2 2.30.0) 1.15
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p23::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.14-r2::gentoo, 3.5.5-r1::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.11.3::gentoo
sys-apps/baselayout:      2.6::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r2::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.16-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: 0
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-mtune=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--deep --tree --unordered-display --ask --ask-enter-invalid --jobs=4 --rebuild-if-unbuilt --noreplace"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-mtune=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-mtune=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB pl"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam flac fortran gdbm gif glamor gles gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv icu introspection ipv6 jpeg lcms ldap libnotify libsecret libtirpc mad mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt5 readline sdl seccomp spell ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-GB pl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="radeon r600 intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-devel/binutils-config-5.1-r1::gentoo was built with the following:
USE="" ABI_X86="(64)"
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2018-06-28 21:26:28 UTC
Today sys-devel/binutils-config is designed to manage linkers installed by sys-devel/binutils and nothing else.

binutils-config basically links
    "${EPREFIX}"/usr/${HOST}/${TARGET}/binutils-bin/${VER}/
to
    "${EPREFIX}"/usr/libexec/gcc/${TARGET}/

sys-devel/lld uses different path.

To help your use case I think it is reasonable to allow absolute path as a linker somewhere here:

https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/binutils-config/files/binutils-config-5.1#n353
Comment 2 Nicholas Sielicki 2019-10-19 20:50:33 UTC
Created attachment 593334 [details, diff]
ld.lld legal if supplied as full path
Comment 3 Nicholas Sielicki 2019-10-19 20:51:15 UTC
This patch is an ugly hack and untested, but at least it bumps the ticket.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2019-10-19 21:59:38 UTC
Another alternative is to drop --linker support from binutils-config as it never survives binutils upgrade.

And instead suggest users to use CFLAGS/LDFLAGS+=-fuse-ld=lld.
Comment 5 Larry the Git Cow gentoo-dev 2019-12-29 20:14:36 UTC
The bug has been closed via the following commit(s):

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

commit bd195f1e0d49e664119adb29100dbd7a094bd008
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-12-29 20:13:58 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-12-29 20:13:58 +0000

    sys-devel/binutils-config: drop runtime linker switch selection
    
    Before this change there were 3 ways to switch default linker:
    1. via LDFLAGS=-fuse-ld=gold LD=${CHOST}-ld.gold
    2. via binutils' USE flags: USE="default-gold gold"
    3. via *FLAGS=-B/path-to-own-tools
    4. via 'binutils-config --linker'
    
    This change drops [3.] entirely in favour of [1.] and [2.].
    [1.] should be preferred.
    
    Reported-by: Andrzej Korwin-Mikke
    Closes: https://bugs.gentoo.org/658054
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../binutils-config/binutils-config-5-r4.ebuild    |   2 +-
 .../binutils-config/binutils-config-5.1-r1.ebuild  |   2 +-
 .../binutils-config/binutils-config-5.2.ebuild     |  42 ++
 .../binutils-config/files/binutils-config-5.2      | 456 +++++++++++++++++++++
 4 files changed, 500 insertions(+), 2 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2020-05-13 23:22:25 UTC
The bug has been referenced in the following commit(s):

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

commit e096452a04e0b03a31cfa461287fa59e0f7cd561
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-05-13 23:22:08 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-05-13 23:22:19 +0000

    sys-devel/binutils-config: drop --linker from manpage, bug #658054
    
    Follow bd195f1e0d49e6
    ("sys-devel/binutils-config: drop runtime linker switch selection")
    and remove deleted '--linker' option from manpage.
    
    Reported-by: Steve Arnold
    Bug: https://bugs.gentoo.org/658054
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/binutils-config/files/binutils-config.8 | 6 ------
 1 file changed, 6 deletions(-)