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. Ian