Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 630066 - sys-devel/gcc-config should set symlink lto linker plugins
Summary: sys-devel/gcc-config should set symlink lto linker plugins
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 612816 (view as bug list)
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2017-09-06 09:35 UTC by Martin Väth
Modified: 2017-12-27 22:43 UTC (History)
7 users (show)

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


Attachments
Add LTO symlink support to gcc-config (0001-Add-support-for-symlinking-appropriate-LTO-plugin.patch,1.36 KB, patch)
2017-09-21 17:08 UTC, Shane Peelar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2017-09-06 09:35:00 UTC
Quite some packages fail with -flto if the gcc's flto linker plugin library /usr/libexec/gcc/$ARCH/$GCC_VERSION/liblto_plugin.so.0.0.0 is not symlinked into /usr/$ARCH/binutils-bin/lib/bfd-plugins

In particular, without this symlink, all packages creating static archives with "ar" or "$ARCH-ar" (in contrast to "gcc-ar" or "$ARCH-gcc-ar") do not do this correctly (unless -ffat-lto objects is in effect - but the latter simply means that flto cannot be used with that archive).

Note that tc-getAR from toolchain-funcs outputs $ARCH-ar (and not $ARCH-gcc-ar), so that e.g. meson.eclass exports a value for AR which requires the plugin.

This leads to such problems as discussed in
https://github.com/mesonbuild/meson/issues/2129

In my opinion, the correct solution would be that gentoo manages the above mentioned plugin symlink. Since this symlink should better point to the plugin corresponding to the currently selected gcc version, I suggest that this be done in gcc-config.
Comment 1 Shane Peelar 2017-09-21 17:08:17 UTC
Created attachment 495798 [details, diff]
Add LTO symlink support to gcc-config
Comment 3 Larry the Git Cow gentoo-dev 2017-12-17 00:24:09 UTC
The bug has been closed via the following commit(s):

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

commit f29fde782b79bc0bf7a8603a86e238412dc2ddfe
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2017-12-17 00:23:49 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2017-12-17 00:24:00 +0000

    sys-devel/gcc-config: Version bump; fixes prefix issues (bug 641096) and adds support for LTO linker plugins (bug 630066)
    
    Closes: https://bugs.gentoo.org/630066
    Bug: https://bugs.gentoo.org/641096
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 sys-devel/gcc-config/Manifest                |  1 +
 sys-devel/gcc-config/gcc-config-1.9.1.ebuild | 54 ++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)
Comment 4 Shane Peelar 2017-12-17 00:51:36 UTC
Awesome!  Now I can remove this from lto-overlay and advise users to use gcc-config-9999.  Thank you!
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2017-12-27 22:43:03 UTC
*** Bug 612816 has been marked as a duplicate of this bug. ***