Ian Lance Taylor wrote: > Mark Mitchell <[EMAIL PROTECTED]> writes: > >> Though, if we *are* doing the template-repository dance, we'll have to >> do that for a while, declare victory, then invoke the LTO front end, >> and, finally, the actual linker, which will be a bit complicated. It >> might be that we should move the invocation of the real linker back into >> gcc.c, so that collect2's job just becomes generating the right pile of >> object files via template instantiation and static >> constructor/destructor generation? > > For most targets we don't need to invoke collect2 at all anyhow, > unless the user is using -frepo. It's somewhat wasteful that we > always run it. > > Moving the invocation of the linker into the gcc driver makes sense to > me, especially if it we can skip invoking collect2 entirely. Note > that on some targets, ones which do not use GNU ld, collect2 does > provide the feature of demangling the ld error output. That facility > would have to be moved into the gcc driver as well.
I agree that this sounds like the best long-term plan. I'll try to work out whether it's actually a short-term win for me to do anything to collect2 at all; if not, then I'll just put stuff straight into the driver, since that's what we really want anyhow. Thanks for the feedback! -- Mark Mitchell CodeSourcery [EMAIL PROTECTED] (650) 331-3385 x713