Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 612816 - sys-devel/binutils: Make binutils work with -flto optimization
Summary: sys-devel/binutils: Make binutils work with -flto optimization
Status: RESOLVED DUPLICATE of bug 630066
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2017-03-16 14:10 UTC by Markus Walter
Modified: 2017-12-31 10:46 UTC (History)
4 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 Markus Walter 2017-03-16 14:10:14 UTC
In the default configuration the CFLAG -flto causes lots of packages to fail to compile. The ar, nm and ranlib tools complain with "plugin needed to handle lto object". The common workaround seems to be, that wrappers gcc-ar, gcc-nm and gcc-ranlib are used, which is discourage by upstream, instead one can create a symlink to automatically load the needed lto plugin as per [1] and [2]. It would be great if this could be done automatically by the binutils or gcc package. (That way some poor sobs may be spared the hunt of the correct solution I had to do in the past few hours).

[1] https://forums.gentoo.org/viewtopic-t-1035544-start-0.html
[2] https://gcc.gnu.org/ml/gcc-help/2016-02/msg00005.html
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2017-12-27 22:43:03 UTC

*** This bug has been marked as a duplicate of bug 630066 ***
Comment 2 Shane Peelar 2017-12-28 14:39:13 UTC
Markus, consider trying out lto-overlay if you want to do a full system build with LTO.  We actually just upstreamed a patch to gcc-config that solves this problem.

Details here:

https://github.com/InBetweenNames/gentooLTO
Comment 3 Markus Walter 2017-12-31 10:46:11 UTC
(In reply to Shane Peelar from comment #2)
> Markus, consider trying out lto-overlay if you want to do a full system
> build with LTO.

Cool, I will definitely check it out. Thanks a lot. :)