On 12 November 2012 14:17, Mans Rullgard mans.rullgard@linaro.org wrote:
On 11 November 2012 22:18, Michael Hope michael.hope@linaro.org wrote:
On 10 November 2012 05:11, "Frank Müller" franky1976@gmx.net wrote:
Michael Hope michael.hope@linaro.org:
My suspicion is that we/crosstool-NG enable extra features like Graphite or GCC is built with a different level of checking. If you
I suspected Graphite as well and removed it in my own builds without noticable difference.
have the time, could you check the flags passed to GCCs configure? You can do this on Ubuntu using:
apt-get build-dep gcc apt-get source gcc dpkg-buildpackage -uc -us -b
and compare the configure line with the one in crosstool-NG's build.log.
Isn't this the same as gcc -v? I've posted the lines at http://lists.linaro.org/pipermail/linaro-toolchain/2012-October/002913.html
Good point. There's nothing obvious in the list. Ubuntu explicitly adds --enable-checking=release but it's the default for release branches like ours.
I can reproduce the slowdown in a smaller testcase. Compiling pcre with -O3 -mfpu=neon -march=armv7-a -mtune=cortex-a8 takes 18.8 s for the Ubuntu Precise 4.6 compiler, 17.8 s for the Ubuntu Quantal 4.7 compiler, and 41.2 s for the Linaro 4.7 2012.10 build. I've logged LP: #1077739 to track. I'll spin a --enable-checking=release build just to check.
Does perf give any clues?
I think I've found the problem. We pass -U_FORTIFY and -fno-stack-protector to make the binary more universal, and the way that crosstool-NG passes these flags on to the tool overrides the default package flags and turns off any optimisations.
Short story: GCC was being built without optimisations. I've got a test build running to verify.
-- Michael