1

I am currently porting a large code base to multiple arm platforms using various tool chains provided by device manufactures. If I build and link the code base on linux it takes roughly 30 seconds to link. For a number of the cross compilers I have this time is about the same but for several of them this time exceeds 10+ minutes. I have tried a number of techniques to lower this but nothing helps (e.g. creating a super lib). The only thing that makes a noticeable different is linking with -0s which cuts the time by close to 40% but still leaves me with a 6 minute link and also is less then ideal during debugging since much of the code is optimized out.

What could make one cross compiler so much slower then the others? In general the charactastics of these compilers are nearly identaly (ARMv7, NEON support, gcc 4.x).

Any suggestions which might improve link time? I link to 3 static libraries, the rest is dynamic links to system libraries.

Kulidan
  • 43
  • 4
  • What tool chains are you using? This would be easier to answer if you were more specific. – Kevin Vermeer Oct 25 '11 at 13:47
  • Here are two examples, please let me know if this is what you need: Fast Example: ./gcc --version gcc ('cs2009q3-hard-67-sb16') 4.4.1 Slow Example: ./gcc --version gcc (Sourcery G++ Lite 2009q3-67) 4.4.1 – Kulidan Oct 25 '11 at 15:26
  • 1
    Erm, not quite. Those are the [config strings](http://www.nas-central.org/wiki/Setting_up_the_codesourcery_toolchain_for_X86_to_ARM9_cross_compiling#Installing_Mentor_Graphics.27_.28ex-CodeSourcery.29_Toolchain), both were passed to [the 2009 3rd quarter v67](https://sourcery.mentor.com/sgpp/lite/arm/portal/release1039) release of the [Code Sourcery ARM toolchain](https://sourcery.mentor.com/sgpp/lite/arm/portal/subscription?@template=lite). I'd guess that 'hard' in the first refers to the hardware floating point in NEON, but its absence in the latter doesn't mean that it's not present. – Kevin Vermeer Oct 25 '11 at 15:54
  • Actually that link to the arm toolchain was a HUGE help. I downloaded the 2010 q1 which is the same 4.4.1 version and the linker is super fast (7 seconds compared to 6+ minutes). Thanks!! – Kulidan Oct 25 '11 at 17:45
  • That's good, but notice that both of your toolchains are from the same version. It's not the CodeSourcery/GCC backbone that's slow, it's something to do with the settings of one of your toolchains. – Kevin Vermeer Oct 25 '11 at 18:04
  • In case some other persons are looking. Try ccache [link](http://ccache.samba.org/). – sessyargc.jp Mar 07 '12 at 22:57

0 Answers0