GCC-4.1.2 Linking takes very long [solved]

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

GCC-4.1.2 Linking takes very long [solved]

#1 Post by kroddn »

Hello there,

i am compiling FreeOrion with GCC-4.1.2. Everything works fine, except of one thing: the linking of the executables takes about 14 Minutes on my machine (3GHz, 2GB Ram). I watched the ld-process, leck of memory is NOT the problem.

I used "time" to measure that:

Code: Select all

real    13m47.636s
user    11m52.565s
sys     0m39.302s
If I use the parameter -s while linking, then an incredible speedup can be measured. But I do not want to run without debugging-symbols.

Is there an intermediat way or are there options to gcc, which can decrease the time to link?
Last edited by kroddn on Tue Aug 07, 2007 8:44 am, edited 1 time in total.

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: GCC-4.1.2 Linking takes very long

#2 Post by tzlaine »

I really have no idea. There is one known problem with ld, around version 2.16.91 or so -- it is dog-slow (quadratic instead of linear time). Other than that I have no idea what the problem might be.

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: GCC-4.1.2 Linking takes very long

#3 Post by kroddn »

It seems that google know more people with such problems:

http://sourceware.org/ml/binutils/2007-06/msg00064.html

Currently I am compiling a new binutils-Package. Let's see, if something is changing then.

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: GCC-4.1.2 Linking takes very long

#4 Post by kroddn »

Using ld version 2.17.50.20070426 fixes that problem. Now there is nothing more in the way for quickly debugging :-)

I did:

apt-get source binutils --compile

With sources from debian testing.


/Edit: can be closed!

Post Reply