Hi all, I'm trying to setup a working environment to compile and link with LTO enabled, however I'm facing some issues that I can't be sure to have properly fixed or resolved, no matter what googling I'm performing :) Environment: gcc (Gentoo 5.3.0 p1.0, pie-0.6.5) 5.3.0 ld di GNU (Gentoo 2.25.1 p1.1) 2.25.1 AR="/usr/bin/gcc-ar" NM="/usr/bin/gcc-nm" RANLIB="/usr/bin/gcc-ranlib" (tried also bash wrappers as recommended on some pages) of course, the distro is gentoo :) flags, both for gcc and ld: -flto=4 -fuse-linker-plugin What puzzles me: 1) Is there any way to state if LTO is producing the expected outcome or falls back to non-optimized code? The ideal should be some hello.c test compilation, I guess. 2) strip always complains that it lacks plugins 3) the most problematic one: whenever a static lib (.a) is produced, compilations depending on it always fails, complaining about missing symbols. I tried every "solution" that I found (placing plugin in right directory, using wrappers for ar/nm/ranlib and so on, to no avail. some examples are plib (plib.sourceforge.net) qtdeclarative, etc. It seems that many symbols are not present in lto-built libs, however I'm not able to fix the issue, so I'm wondering if this could be an issue with my setup or the package itself that can't be built with LTO. Again, a very short test case to check if my setup is fine would be really helpful. Any help would be really appreciated: hints, links, whatever. Many thanks in advance. -- Fabio