This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Extremelly slow link time with GCC 3.2 and 3.3


On Wed, May 28, 2003 at 10:57:56AM -0400, Andrew Pinski wrote:
> the linker, I would say report it to the binutils guys and see what 
> they say, since the linker is their problem.

Don't be so quick to pass the buck!  It's a bug that a request for
a link-time optimization can't be turned off for pathalogical input.
I'd argue the bug was in gcc, since the optimization request comes
via a section flag, and there is a -f flag that ought to disable
string merging.

> On Wednesday, May 28, 2003, at 14:50 US/Eastern, Manuel Serrano wrote:
> >Now I have test GCC 3.3. The link time is, again, *40 minutes* but by
> >contrast with GCC 3.2, "-fno-merge-constants" does not help anymore!

I'm not sure now whether I posted this or not, but the following
should cure this bug for you.

	* dwarf2out.c (DEBUG_STR_SECTION_FLAGS): Heed flag_merge_constants.

diff -urpN -xCVS -x'*~' -x'*.info*' -x'*.[17]' -xTAGS gcc-ppc64-33.orig/gcc/dwarf2out.c gcc-ppc64-33/gcc/dwarf2out.c
--- gcc-ppc64-33.orig/gcc/dwarf2out.c	2003-05-07 16:36:07.000000000 +0930
+++ gcc-ppc64-33/gcc/dwarf2out.c	2003-05-12 16:58:02.000000000 +0930
@@ -3780,7 +3780,9 @@ static void mark_limbo_die_list		PARAMS 
 /* 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

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]