Dear all,
we have an ARM Cortex-A8 board where we are running our application. I am in charge of maintaining the Linux on it and the toolchain/SDK setup. So far we've been running Poky/OpenEmbedded and using the cross compiler that came about during the compilation.
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
Running with -ftime-report, most of the additional time seems to be spent in the parser. Adding -fno-graphite-identity -fno-graphite for Linaro's gcc did not make a difference.
I believe I tried to use crosstool-ng to make my own version, but I don't remember the results as this was over 7 weeks ago. I also did not have a chance to compare performance of the binaries. I do notice a difference in compilation sizes (4.8 MB for Ubuntu's 4.6 version, 4.1 MB for Linaro's 4.7 versions - can't test anything other right now).
I would like to use Linaro's gcc as the crosscompiler for our project, as it is an easy setup. Repackaging Ubuntu's version is an option, though (some of the team do not use Ubuntu, plus I'd like everybody to use EXACTLY the same version of the crosscompiler). So there is no real "problem" for me, per se, but I am extremely curious as to what is going on here. It seems that Linaro's gcc has additional patches or maybe just different default settings that cause additional time to be spent in the parser. It would be interesting to know what exactly this is and whether/how it can be disabled in those cases where time of compilation is more important than e.g. performance gain.
TIA for replying.
Best
Frank
On 28 October 2012 18:08, "Frank Müller" franky1976@gmx.net wrote:
Dear all,
we have an ARM Cortex-A8 board where we are running our application. I am in charge of maintaining the Linux on it and the toolchain/SDK setup. So far we've been running Poky/OpenEmbedded and using the cross compiler that came about during the compilation.
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.
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.
Compiling one file with Ubuntu 12.10's arm-linux-gnueabihf-g++-4.7 with -v:
/usr/bin/arm-linux-gnueabihf-g++-4.7 -Wno-psabi -DNDEBUG -Isrc -Iobj/Build/Release -include obj/Build/Release/default.h -O3 -Werror -Wall -v -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -isystem src/messages -Wfatal-errors -Wpointer-arith -Wcast-qual -Wwrite-strings -Wno-long-long -Wno-variadic-macros -Wno-multichar -Woverloaded-virtual -Wctor-dtor-privacy -Wstrict-null-sentinel -Wsign-promo -ggdb1 --param inline-unit-growth=200 --param large-function-growth=1000 -MMD -MP -fpch-deps -std=c++0x -ftree-vectorize -funroll-loops -fomit-frame-pointer -o "obj/Build/Release/main.o" -MF obj/Build/Release/main.d -c "src/main.cpp" Using built-in specs. COLLECT_GCC=/usr/bin/arm-linux-gnueabihf-g++-4.7 Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.2-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabihf/include/c++/4.7.2 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- --includedir=/usr/arm-linux-gnueabihf/include --with-headers=/usr/arm-linux-gnueabihf/include --with-libs=/usr/arm-linux-gnueabihf/lib Thread model: posix gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-1ubuntu1) COLLECT_GCC_OPTIONS='-Wno-psabi' '-D' 'NDEBUG' '-I' 'src' '-I' 'obj/Build/Release' '-include' 'obj/Build/Release/default.h' '-O3' '-Werror' '-Wall' '-v' '-march=armv7-a' '-mtune=cortex-a8' '-mfpu=neon' '-mfloat-abi=hard' '-isystem' 'src/messages' '-Wfatal-errors' '-Wpointer-arith' '-Wcast-qual' '-Wwrite-strings' '-Wno-long-long' '-Wno-variadic-macros' '-Wno-multichar' '-Woverloaded-virtual' '-Wctor-dtor-privacy' '-Wstrict-null-sentinel' '-Wsign-promo' '-ggdb1' '--param' 'inline-unit-growth=200' '--param' 'large-function-growth=1000' '-MMD' '-MP' '-fpch-deps' '-std=c++11' '-ftree-vectorize' '-funroll-loops' '-fomit-frame-pointer' '-o' 'obj/Build/Release/main.o' '-MF' 'obj/Build/Release/main.d' '-c' '-shared-libgcc' '-mthumb' '-mtls-dialect=gnu' /usr/lib/gcc/arm-linux-gnueabihf/4.7/cc1plus -quiet -v -I src -I obj/Build/Release -imultiarch arm-linux-gnueabihf -MMD obj/Build/Release/main.d -MF obj/Build/Release/main.d -MP -MQ obj/Build/Release/main.o -D_GNU_SOURCE -D NDEBUG -include obj/Build/Release/default.h -isystem src/messages src/main.cpp -quiet -dumpbase main.cpp -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -mthumb -mtls-dialect=gnu -auxbase-strip obj/Build/Release/main.o -ggdb1 -O3 -Wno-psabi -Werror -Wall -Wfatal-errors -Wpointer-arith -Wcast-qual -Wwrite-strings -Wno-long-long -Wno-variadic-macros -Wno-multichar -Woverloaded-virtual -Wctor-dtor-privacy -Wstrict-null-sentinel -Wsign-promo -std=c++11 -version -fpch-deps -ftree-vectorize -funroll-loops -fomit-frame-pointer --param inline-unit-growth=200 --param large-function-growth=1000 -fstack-protector -o /tmp/ccifId9I.s GNU C++ (Ubuntu/Linaro 4.7.2-1ubuntu1) version 4.7.2 (arm-linux-gnueabihf) compiled by GNU C version 4.7.2, GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring duplicate directory "/usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/include" ignoring nonexistent directory "/usr/include/arm-linux-gnueabihf" #include "..." search starts here: #include <...> search starts here: src obj/Build/Release src/messages /usr/arm-linux-gnueabihf/include/c++/4.7.2 /usr/arm-linux-gnueabihf/include/c++/4.7.2/arm-linux-gnueabihf /usr/arm-linux-gnueabihf/include/c++/4.7.2/backward /usr/lib/gcc/arm-linux-gnueabihf/4.7/include /usr/lib/gcc/arm-linux-gnueabihf/4.7/include-fixed /usr/arm-linux-gnueabihf/include /usr/include End of search list. GNU C++ (Ubuntu/Linaro 4.7.2-1ubuntu1) version 4.7.2 (arm-linux-gnueabihf) compiled by GNU C version 4.7.2, GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 6a0e921a320b56c1431730761a6f5d56 COLLECT_GCC_OPTIONS='-Wno-psabi' '-D' 'NDEBUG' '-I' 'src' '-I' 'obj/Build/Release' '-include' 'obj/Build/Release/default.h' '-O3' '-Werror' '-Wall' '-v' '-march=armv7-a' '-mtune=cortex-a8' '-mfpu=neon' '-mfloat-abi=hard' '-isystem' 'src/messages' '-Wfatal-errors' '-Wpointer-arith' '-Wcast-qual' '-Wwrite-strings' '-Wno-long-long' '-Wno-variadic-macros' '-Wno-multichar' '-Woverloaded-virtual' '-Wctor-dtor-privacy' '-Wstrict-null-sentinel' '-Wsign-promo' '-ggdb1' '--param' 'inline-unit-growth=200' '--param' 'large-function-growth=1000' '-MMD' '-MP' '-fpch-deps' '-std=c++11' '-ftree-vectorize' '-funroll-loops' '-fomit-frame-pointer' '-o' 'obj/Build/Release/main.o' '-MF' 'obj/Build/Release/main.d' '-c' '-shared-libgcc' '-mthumb' '-mtls-dialect=gnu' /usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/as -v -I src -I obj/Build/Release -march=armv7-a -mfloat-abi=hard -mfpu=neon -meabi=5 -o obj/Build/Release/main.o /tmp/ccifId9I.s GNU assembler version 2.22 (arm-linux-gnueabihf) using BFD version (GNU Binutils for Ubuntu) 2.22 COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/4.7/:/usr/lib/gcc/arm-linux-gnueabihf/4.7/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/4.7/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/4.7/:/usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/lib/../lib/:/usr/lib/gcc/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/lib/ COLLECT_GCC_OPTIONS='-Wno-psabi' '-D' 'NDEBUG' '-I' 'src' '-I' 'obj/Build/Release' '-include' 'obj/Build/Release/default.h' '-O3' '-Werror' '-Wall' '-v' '-march=armv7-a' '-mtune=cortex-a8' '-mfpu=neon' '-mfloat-abi=hard' '-isystem' 'src/messages' '-Wfatal-errors' '-Wpointer-arith' '-Wcast-qual' '-Wwrite-strings' '-Wno-long-long' '-Wno-variadic-macros' '-Wno-multichar' '-Woverloaded-virtual' '-Wctor-dtor-privacy' '-Wstrict-null-sentinel' '-Wsign-promo' '-ggdb1' '--param' 'inline-unit-growth=200' '--param' 'large-function-growth=1000' '-MMD' '-MP' '-fpch-deps' '-std=c++11' '-ftree-vectorize' '-funroll-loops' '-fomit-frame-pointer' '-o' 'obj/Build/Release/main.o' '-MF' 'obj/Build/Release/main.d' '-c' '-shared-libgcc' '-mthumb' '-mtls-dialect=gnu'
===========================================================================
And with Linaro's arm-linux-gnueabihf-g++ in version 4.7.3:
~/compiler/bin/arm-linux-gnueabihf-g++ -Wno-psabi -DNDEBUG -Isrc -Iobj/Build/Release -include obj/Build/Release/default.h -O3 -Werror -Wall -v -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -isystem src/messages -Wfatal-errors -Wpointer-arith -Wcast-qual -Wwrite-strings -Wno-long-long -Wno-variadic-macros -Wno-multichar -Woverloaded-virtual -Wctor-dtor-privacy -Wstrict-null-sentinel -Wsign-promo -ggdb1 --param inline-unit-growth=200 --param large-function-growth=1000 -MMD -MP -fpch-deps -std=c++0x -ftree-vectorize -funroll-loops -fomit-frame-pointer -o "obj/Build/Release/main.o" -MF obj/Build/Release/main.d -c "src/main.cpp" Using built-in specs. COLLECT_GCC=~/compiler/bin/arm-linux-gnueabihf-g++ Target: arm-linux-gnueabihf Configured with: /cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/gcc-linaro-4.7-2012.10/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-linux-gnueabihf --prefix=/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/install --with-sysroot=/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc --enable-languages=c,c++,fortran --enable-multilib --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard --with-pkgversion='crosstool-NG linaro-1.13.1-4.7-2012.10-20121022 - Linaro GCC 2012.10' --with-bugurl=https://bugs.launchpad.net/gcc-linaro --enable-__cxa_atexit --enable-libmudflap --enable-libgomp --enable-libssp --with-gmp=/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-mpfr=/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-mpc=/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-ppl=/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-cloog=/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-libelf=/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-host-libstdcxx='-L/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static/lib -lpwl' --enable-threads=posix --disable-libstdcxx-pch --enable-linker-build-id --enable-gold --with-local-prefix=/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc --enable-c99 --enable-long-long --with-mode=thumb Thread model: posix gcc version 4.7.3 20121001 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2012.10-20121022 - Linaro GCC 2012.10) COLLECT_GCC_OPTIONS='-Wno-psabi' '-D' 'NDEBUG' '-I' 'src' '-I' 'obj/Build/Release' '-include' 'obj/Build/Release/default.h' '-O3' '-Werror' '-Wall' '-v' '-march=armv7-a' '-mtune=cortex-a8' '-mfpu=neon' '-mfloat-abi=hard' '-isystem' 'src/messages' '-Wfatal-errors' '-Wpointer-arith' '-Wcast-qual' '-Wwrite-strings' '-Wno-long-long' '-Wno-variadic-macros' '-Wno-multichar' '-Woverloaded-virtual' '-Wctor-dtor-privacy' '-Wstrict-null-sentinel' '-Wsign-promo' '-ggdb1' '--param' 'inline-unit-growth=200' '--param' 'large-function-growth=1000' '-MMD' '-MP' '-fpch-deps' '-std=c++11' '-ftree-vectorize' '-funroll-loops' '-fomit-frame-pointer' '-o' 'obj/Build/Release/main.o' '-MF' 'obj/Build/Release/main.d' '-c' '-shared-libgcc' '-mthumb' '-mtls-dialect=gnu' ~/compiler/bin/../libexec/gcc/arm-linux-gnueabihf/4.7.3/cc1plus -quiet -v -I src -I obj/Build/Release -imultilib . -imultiarch arm-linux-gnueabihf -iprefix ~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/ -isysroot ~/compiler/bin/../arm-linux-gnueabihf/libc -MMD obj/Build/Release/main.d -MF obj/Build/Release/main.d -MP -MQ obj/Build/Release/main.o -D_GNU_SOURCE -D NDEBUG -include obj/Build/Release/default.h -isystem src/messages src/main.cpp -quiet -dumpbase main.cpp -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -mthumb -mtls-dialect=gnu -auxbase-strip obj/Build/Release/main.o -ggdb1 -O3 -Wno-psabi -Werror -Wall -Wfatal-errors -Wpointer-arith -Wcast-qual -Wwrite-strings -Wno-long-long -Wno-variadic-macros -Wno-multichar -Woverloaded-virtual -Wctor-dtor-privacy -Wstrict-null-sentinel -Wsign-promo -std=c++11 -version -fpch-deps -ftree-vectorize -funroll-loops -fomit-frame-pointer --param inline-unit-growth=200 --param large-function-growth=1000 -o /tmp/ccUrHZXf.s GNU C++ (crosstool-NG linaro-1.13.1-4.7-2012.10-20121022 - Linaro GCC 2012.10) version 4.7.3 20121001 (prerelease) (arm-linux-gnueabihf) compiled by GNU C version 4.1.3 20080704 (prerelease) (Ubuntu 4.1.2-27ubuntu1), GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf/arm-linux-gnueabihf" ignoring duplicate directory "~/compiler/bin/../lib/gcc/../../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/include/c++/4.7.3" ignoring duplicate directory "~/compiler/bin/../lib/gcc/../../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf/." ignoring nonexistent directory "~/compiler/bin/../lib/gcc/../../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf/arm-linux-gnueabihf" ignoring duplicate directory "~/compiler/bin/../lib/gcc/../../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/include/c++/4.7.3/backward" ignoring duplicate directory "~/compiler/bin/../lib/gcc/../../lib/gcc/arm-linux-gnueabihf/4.7.3/include" ignoring nonexistent directory "~/compiler/bin/../arm-linux-gnueabihf/libc/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc/include/." ignoring nonexistent directory "~/compiler/bin/../arm-linux-gnueabihf/libc/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc/include/arm-linux-gnueabihf" ignoring nonexistent directory "~/compiler/bin/../arm-linux-gnueabihf/libc/cbuild/slaves/oort12/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc/include" ignoring duplicate directory "~/compiler/bin/../lib/gcc/../../lib/gcc/arm-linux-gnueabihf/4.7.3/include-fixed" ignoring duplicate directory "~/compiler/bin/../lib/gcc/../../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/include" ignoring duplicate directory "~/compiler/bin/../arm-linux-gnueabihf/libc/usr/include" #include "..." search starts here: #include <...> search starts here: src obj/Build/Release src/messages ~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/include/c++/4.7.3 ~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf/. ~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/include/c++/4.7.3/backward ~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/include ~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/include-fixed ~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/include ~/compiler/bin/../arm-linux-gnueabihf/libc/usr/include/. ~/compiler/bin/../arm-linux-gnueabihf/libc/usr/include/arm-linux-gnueabihf End of search list. GNU C++ (crosstool-NG linaro-1.13.1-4.7-2012.10-20121022 - Linaro GCC 2012.10) version 4.7.3 20121001 (prerelease) (arm-linux-gnueabihf) compiled by GNU C version 4.1.3 20080704 (prerelease) (Ubuntu 4.1.2-27ubuntu1), GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 64b1e9c743d0e4b785aba96b8e8b411b COLLECT_GCC_OPTIONS='-Wno-psabi' '-D' 'NDEBUG' '-I' 'src' '-I' 'obj/Build/Release' '-include' 'obj/Build/Release/default.h' '-O3' '-Werror' '-Wall' '-v' '-march=armv7-a' '-mtune=cortex-a8' '-mfpu=neon' '-mfloat-abi=hard' '-isystem' 'src/messages' '-Wfatal-errors' '-Wpointer-arith' '-Wcast-qual' '-Wwrite-strings' '-Wno-long-long' '-Wno-variadic-macros' '-Wno-multichar' '-Woverloaded-virtual' '-Wctor-dtor-privacy' '-Wstrict-null-sentinel' '-Wsign-promo' '-ggdb1' '--param' 'inline-unit-growth=200' '--param' 'large-function-growth=1000' '-MMD' '-MP' '-fpch-deps' '-std=c++11' '-ftree-vectorize' '-funroll-loops' '-fomit-frame-pointer' '-o' 'obj/Build/Release/main.o' '-MF' 'obj/Build/Release/main.d' '-c' '-shared-libgcc' '-mthumb' '-mtls-dialect=gnu' ~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/as -v -I src -I obj/Build/Release -march=armv7-a -mfloat-abi=hard -mfpu=neon -meabi=5 -o obj/Build/Release/main.o /tmp/ccUrHZXf.s GNU assembler version 2.22 (arm-linux-gnueabihf) using BFD version (crosstool-NG linaro-1.13.1-4.7-2012.10-20121022 - Linaro GCC 2012.10) 2.22 COMPILER_PATH=~/compiler/bin/../libexec/gcc/arm-linux-gnueabihf/4.7.3/:~/compiler/bin/../libexec/gcc/:~/compiler/bin/../libexec/gcc/arm-linux-gnueabihf/:~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ LIBRARY_PATH=~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/:~/compiler/bin/../lib/gcc/:~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/:~/compiler/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/lib/:~/compiler/bin/../arm-linux-gnueabihf/libc/lib/:~/compiler/bin/../arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf/:~/compiler/bin/../arm-linux-gnueabihf/libc/usr/lib/:~/compiler/bin/../arm-linux-gnueabihf/libc/usr/lib/arm-linux-gnueabihf/ COLLECT_GCC_OPTIONS='-Wno-psabi' '-D' 'NDEBUG' '-I' 'src' '-I' 'obj/Build/Release' '-include' 'obj/Build/Release/default.h' '-O3' '-Werror' '-Wall' '-v' '-march=armv7-a' '-mtune=cortex-a8' '-mfpu=neon' '-mfloat-abi=hard' '-isystem' 'src/messages' '-Wfatal-errors' '-Wpointer-arith' '-Wcast-qual' '-Wwrite-strings' '-Wno-long-long' '-Wno-variadic-macros' '-Wno-multichar' '-Woverloaded-virtual' '-Wctor-dtor-privacy' '-Wstrict-null-sentinel' '-Wsign-promo' '-ggdb1' '--param' 'inline-unit-growth=200' '--param' 'large-function-growth=1000' '-MMD' '-MP' '-fpch-deps' '-std=c++11' '-ftree-vectorize' '-funroll-loops' '-fomit-frame-pointer' '-o' 'obj/Build/Release/main.o' '-MF' 'obj/Build/Release/main.d' '-c' '-shared-libgcc' '-mthumb' '-mtls-dialect=gnu'
===========================================================================
And the compilation timing and binary sizes for the whole project:
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) (crosstool-NG linaro-1.13.1-4.7-2012.10-20121022 - Linaro GCC 2012.10) 11m3s/4.2mb same (4.7.3/Linaro) but with -mtune=cortex-a9
Frank
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.
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.
-- Michael
Hi
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
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
On 8 November 2012 21:32, "Frank Müller" franky1976@gmx.net wrote:
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.
Ah, good. That was going to be my next step.
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.
My suspicion is that we/crosstool-NG enable extra features like Graphite or GCC is built with a different level of checking. If you 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.
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?
Generally not. Generally the compiler dominates the build time.
-- Michael
linaro-toolchain@lists.linaro.org