I now had some time to try out making my own compiler, and started off with a few different configurations with crosstool-ng 1.16.0. Interestingly the results were as slow (if not slightly slower with almost 12 minutes) in compilation as Linaro's gcc.
So maybe my question should not be why Linaro's gcc is so slow, but why Ubuntu's is so fast. Though I also should note that a) a native (i686/x86_64) build is around the same speed as Ubuntu's crosscompiler and b) Ubuntu's version is maintained by Linaro as well.
Marcin Juszkiewicz, if you're on this list, maybe you could offer some insight what the main difference is?
May binutil versions and whether eglibc/glibc/uclibc was used play into it?
Frank
"Frank Müller" franky1976@gmx.net
Michael Hope michael.hope@linaro.org
On 30 October 2012 22:11, Mans Rullgard mans.rullgard@linaro.org
wrote:
On 29 October 2012 16:28, "Frank Müller" franky1976@gmx.net wrote:
Mans Rullgard mans.rullgard@linaro.org wrote:
On 28 October 2012 18:08, "Frank Müller" franky1976@gmx.net
wrote:
For easier maintenance, we are now switching to Linaro. The image
is
set
up and I can compile, however I notice a peculiar fact: the binary distribution of Linaro's gcc
(https://launchpad.net/linaro-toolchain-binaries/trunk/2012.10/+download/gcc-...)
has a significantly larger compilation speed than a version of arm-linux-gnueabihf-gcc that is shipping with Ubuntu. In our
particular case, using
Ubuntu's version it takes less than 6 minutes to compile our
software,
but 10
minutes when we use Linaro's version. The makefiles and source are
exactly
the same, only the compiler is different. I also tried an older
version
(4.6) of Linaro's gcc to match the Ubuntu one (tested the 12.04
shipped
version), with no significant difference.
Compiler flags for the system are -march=armv7-a -mtune=cortex-a8
-mfpu=neon -mfloat-abi=hard
Could you please show us the full output from compiling one of your source files adding -v to the flags with both compilers? This will reveal any differences in how they were configured.
Of course. I've also updated to the Ubuntu 12.10
g++-arm-linux-gnueabihf_4.7.2 version so it matches a bit better. For
better readability I've
added "=====" lines between the outputs.
Your Linaro compiler is a 32-bit build, the Ubuntu one 64-bit. That might explain at least part of the difference.
Hi Frank. I had a quick play and built a 64 bit version of the current release. See:
http://people.linaro.org/~michaelh/incoming/gcc-linaro-arm-linux-gnueabihf-4...
Could you give it a try under Ubuntu Precise and see if the compilation speed changes? If not we can look further.
I tried your 64 bit version and got a compilation time of 11m5.699s.
So the updated "benchmark" overview is now
6m24s/4.6mb gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 7m2s/4.0mb gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-1ubuntu1) 10m51s/4.0mb gcc version 4.7.3 20121001 (prerelease) 32 bit 11m3s/4.2mb same (4.7.3/Linaro) but with -mtune=cortex-a9 11m5s/4.0mb gcc version 4.7.3 20121001 (prerelease) 64 bit
Has anybody done any performance comparisons with the two compilers (Ubuntu vs Linaro)? Should I try to make an example project that exhibits this "problem"?
Frank