This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc3.2 slow link time
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Corey Ernst <corey at elemtech dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 29 Sep 2003 16:49:56 +0200
- Subject: Re: gcc3.2 slow link time
- References: <3F7862CC.7080602@elemtech.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Sep 29, 2003 at 10:50:20AM -0600, Corey Ernst wrote:
> I was wondering if someone could give me some advice on how to make
> gcc3.2.3 link faster. We upgraded from gcc2.95.3 and now the linking
> time with gcc3.2.3 is up from 15 seconds to 2min 20sec. I have heard of
> 2 things I could do to remedy this:
>
> 1. Apply the patch in dwarf2out.c
>
> /* Section flags for .debug_str section. */
> #ifdef HAVE_GAS_SHF_MERGE
> #define DEBUG_STR_SECTION_FLAGS \
> - (SECTION_DEBUG | SECTION_MERGE | SECTION_STRINGS | 1)
> + (flag_merge_constants \
> + ? SECTION_DEBUG | SECTION_MERGE | SECTION_STRINGS | 1 \
> + : SECTION_DEBUG)
> #else
> #define DEBUG_STR_SECTION_FLAGS SECTION_DEBUG
> #endif
>
> 2. Compile with -fno-merge-constants
>
> I have tried both (at the same time). Neither seems to work for me.
> I'm configuring gcc3.2.3 like so:
> configure --program-suffix=Test3.2.3 --enable-languages=c,c++,f77,java,objc
>
> Any suggestions as to what I'm doing wrong here?
>
> -Should I add the option "--with-dwarf2" in order for the patch to be
> used?
>
> -When I apply the patch to dwart2out.c, do I have to do a "make
> distclean" in order for it to be compiled correctly?
>
> -When I do the "make install", do I have to delete anything beforehand,
> or will the install just overwrite? (from the looks of it, it is
> overwriting, like it should)
Better is speeding up the linker, see:
http://sources.redhat.com/ml/binutils/2003-09/msg00324.html
Jakub