This is the mail archive of the
mailing list for the GCC project.
Re: speedup collect2 (by not using it)
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Mike Stump <mrs at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 22 May 2003 23:33:15 -0700
- Subject: Re: speedup collect2 (by not using it)
- References: <C94CD574-8CA5-11D7-8138-003065A77310@apple.com>
Mike Stump <email@example.com> writes:
> On Thursday, May 22, 2003, at 01:02 PM, Zack Weinberg wrote:
>> I think this is a fine idea in principle. We need to nail down
>> precisely what collect2 is or is not used for, of course, and make
>> sure it's invoked when necessary.
> I've done that as much as I can. The HP and AIX folks kicked in
> exactly what I hoped to hear.
>> Better check unified tree builds and the like, though.
> It should not impact them any. What concerns do you have?
gcc/configure.in, when it detects a unified tree build, symlinks
../ld/ld-new to collect-ld. And only collect-ld. If collect2.c
looks for the linker as "collect-ld", but gcc.c doesn't, it won't
After installation it should all be fine, but I think it may blow up
building the target libraries.
Please check whether or not this is a problem, and if it is, fix it.
> + #else
> + #undef USE_COLLECT2
> + #define USE_COLLECT2 1
> + #endif
Ick. Just make configure define USE_COLLECT2 to 1 instead of the
empty string. (It'll be easiest to do this by making USE_COLLECT2 be
a real AC_DEFINE rather than something stuffed into xm_defines.)
> ! /* On a system that does USE_COLLECT2, we must always run
> ! it, otherwise, we don't run collect2 for any reason other
> ! than -frepo. */
Awkward wording; I would say
/* If the host configuration has set USE_COLLECT2, we must always
run collect2. Otherwise we need only run it if -frepo is in use. */