http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59893
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- On Tue, 21 Jan 2014, glisse at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59893 > > --- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> --- > (In reply to jos...@codesourcery.com from comment #1) > > Are LTO objects now independent of the compiler host (see bug 41526) (so > > that such libraries will work properly when copied from one host to > > another as part of a Canadian cross build)? > > Thanks for the link (I don't know much about the implementation of LTO). Maybe > restricting my proposition to the case build==host would be safer? If only > native builds work, I am still ok with that, but I won't be surprised if there > are bugs preventing it... My point is not just that a Canadian cross build where the target libraries get rebuilt would rebuild them with the build-x-target compiler (producing results not actually usable on the host), but that the normal case for a Canadian cross build would copy the libraries from the build-x-target compiler - which was built with build = host - rather than rebuilding them at all (using make all-host when building the Canadian cross compiler). Essentially, I'm suggesting that host-dependence of LTO information *is* a reason to consider use of LTO in GCC's libraries as something experimental and not appropriate to enable by default.