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
*** This bug has been marked as a duplicate of bug 630066 ***
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
(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. :)