This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc3.2 slow link time
- From: Corey Ernst <corey at elemtech dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 29 Sep 2003 10:50:20 -0600
- Subject: gcc3.2 slow link time
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)
--thanks,
Corey