Hi all,
I have built our customized u-boot (u-boot-2012.10-rc3), with two Linaro toolchain, but have no luck with the latest toolchain.
The u-boot built with gcc-linaro-arm-none-eabi-4.9-2014.09_linux can boot on the development board. This toolchain was pre-built toolchain from Linaro, built with crosstool-NG. The version is gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09)
With the same u-boot source, the binary built with the Linaro gcc 4.9 2015.04 hang on the same board. The 2nd toolchain was compiled locally on RHEL6, built with ABE tool. We build it locally to avoid "GLIBC_2.14 not found" issue on the pre-built toolchain. The version is gcc version 4.9.3 20150413 (prerelease) (Linaro GCC 2015.04)
Does anyone have an idea what happen? Is it a regression bug in gcc4.9?
Thanks, Joel -------------------------------------------------------- [joelz@ldt-joelz]:$ /projects/broadcom-linux/shared/toolchains/gcc-linaro-arm-none-eabi-4.9-2014.09_linux/bin/arm-none-eabi-gcc -v Using built-in specs. COLLECT_GCC=/projects/broadcom-linux/shared/toolchains/gcc-linaro-arm-none-eabi-4.9-2014.09_linux/bin/arm-none-eabi-gcc COLLECT_LTO_WRAPPER=/projects/broadcom-linux/shared/toolchains/gcc-linaro-arm-none-eabi-4.9-2014.09_linux/bin/../libexec/gcc/arm-none-eabi/4.9.2/lto-wrapper Target: arm-none-eabi Configured with: /cbuild/slaves/oorts/crosstool-ng/builds/arm-none-eabi-linux/.build/src/gcc-linaro-4.9-2014.09/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-none-eabi --prefix=/cbuild/slaves/oorts/crosstool-ng/builds/arm-none-eabi-linux/install --with-local-prefix=/cbuild/slaves/oorts/crosstool-ng/builds/arm-none-eabi-linux/install/arm-none-eabi --without-headers --with-newlib --enable-threads=no --disable-shared --with-pkgversion='crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09' --with-bugurl=https://bugs.launchpad.net/gcc-linaro --disable-__cxa_atexit --with-gmp=/cbuild/slaves/oorts/crosstool-ng/builds/arm-none-eabi-linux/.build/arm-none-eabi/build/static --with-mpfr=/cbuild/slaves/oorts/crosstool-ng/builds/arm-none-eabi-linux/.build/arm-none-eabi/build/static --with-mpc=/cbuild/slaves/oorts/crosstool-ng/builds/arm-none-eabi-linux/.build/arm-none-eabi/build/static --with-isl=/cbuild/slaves/oorts/crosstool-ng/builds/arm-none-eabi-linux/.build/arm-none-eabi/build/static --with-cloog=/cbuild/slaves/oorts/crosstool-ng/builds/arm-none-eabi-linux/.build/arm-none-eabi/build/static --with-libelf=/cbuild/slaves/oorts/crosstool-ng/builds/arm-none-eabi-linux/.build/arm-none-eabi/build/static --enable-lto --enable-linker-build-id --enable-libmudflap --disable-libgomp --enable-libssp --disable-libstdcxx-pch --enable-multilib --enable-languages=c,c++,fortran --with-multilib-list=aprofile Thread model: single gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) --------------------------------------------- [joelz@ldt-joelz]:$ /projects/toolchains/gcc-4.9-rhel6-local-build/bin/arm-linux-gnueabi-gcc -v Using built-in specs. COLLECT_GCC=/projects/toolchains/gcc-4.9-rhel6-local-build/bin/arm-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/projects/toolchains/abe/_build/builds/destdir/x86_64-unknown-linux-gnu/libexec/gcc/arm-linux-gnueabi/4.9.3/lto-wrapper Target: arm-linux-gnueabi Configured with: '/projects/toolchains/abe/_build/snapshots/gcc.git~linaro-4.9-branch/configure' SHELL=/bin/sh --with-bugurl=https://bugs.linaro.org --with-mpc=/projects/toolchains/abe/_build/builds/destdir/x86_64-unknown-linux-gnu --with-mpfr=/projects/toolchains/abe/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gmp=/projects/toolchains/abe/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gnu-as --with-gnu-ld --disable-libstdcxx-pch --disable-libmudflap --with-cloog=no --with-ppl=no --with-isl=no --disable-nls --enable-multiarch --disable-multilib --enable-c99 --with-tune=cortex-a9 --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb --with-build-sysroot=/projects/toolchains/abe/_build/sysroots/arm-linux-gnueabi --enable-lto --enable-linker-build-id --enable-long-long --enable-shared --with-sysroot=/projects/toolchains/abe/_build/builds/sysroot-arm-linux-gnueabi --enable-languages=c,c++,fortran,lto --enable-fix-cortex-a53-835769 --enable-checking=yes --disable-bootstrap --with-bugurl=https://bugs.linaro.org --with-pkgversion='Linaro GCC 2015.04' --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabi --prefix=/projects/toolchains/abe/_build/builds/destdir/x86_64-unknown-linux-gnu Thread model: posix gcc version 4.9.3 20150413 (prerelease) (Linaro GCC 2015.04)
On Tue, Apr 21, 2015 at 12:35 PM, Joel (Xi Zhou) Zhou joel.zhou@broadcom.com wrote:
The u-boot built with gcc-linaro-arm-none-eabi-4.9-2014.09_linux can boot on the development board. This toolchain was pre-built toolchain from Linaro, built with crosstool-NG. The version is gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09)
With the same u-boot source, the binary built with the Linaro gcc 4.9 2015.04 hang on the same board. The 2nd toolchain was compiled locally on RHEL6, built with ABE tool. We build it locally to avoid “GLIBC_2.14 not found” issue on the pre-built toolchain. The version is gcc version 4.9.3 20150413 (prerelease) (Linaro GCC 2015.04)
The older toolchain is built with crosstool-NG. The newer one is built with ABE. There are likely some subtle differences in behaviour between them, and this might be causing the problem. This would not be a problem normally, but low level code like bootloaders are more sensitive to these kinds of things. Or it could be a latent bug in the new release.
Since you have one compiler that works and one that doesn't, I would suggest that you try mixing them to isolate the problem. Compile uboot with the old release and link with the new release to see if that works. Compile uboot with the new release and link with the old release to see if that works. That should isolate the problem to either gcc or binutils. If it is the new gcc that is broken, then try reducing compiler optimization levels to see if that helps. If it does help, then you can do bisection across the source tree to try to find one file that causes a failure at high optimization levels but works at low optimization levels. You can then debug from there. If it is the new binutils that is the problem, then you can try using objdump and/or readelf to look for subtle differences in the output that might be causing problems.
Jim
On 04/21/2015 03:18 PM, Jim Wilson wrote:
On Tue, Apr 21, 2015 at 12:35 PM, Joel (Xi Zhou) Zhou joel.zhou@broadcom.com wrote:
The u-boot built with gcc-linaro-arm-none-eabi-4.9-2014.09_linux can boot on the development board. This toolchain was pre-built toolchain from Linaro, built with crosstool-NG. The version is gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09)
With the same u-boot source, the binary built with the Linaro gcc 4.9 2015.04 hang on the same board. The 2nd toolchain was compiled locally on RHEL6, built with ABE tool. We build it locally to avoid “GLIBC_2.14 not found” issue on the pre-built toolchain. The version is gcc version 4.9.3 20150413 (prerelease) (Linaro GCC 2015.04)
The older toolchain is built with crosstool-NG. The newer one is built with ABE. There are likely some subtle differences in behaviour between them, and this might be causing the problem. This would not be a problem normally, but low level code like bootloaders are more sensitive to these kinds of things. Or it could be a latent bug in the new release.
There are differences between crosstool-ng built toolchains and ABE built ones, but they're mostly minor tweaks. Crosstool-ng applies it's ow patches to get things to build. ABE doesn't do any patching. It's probably a compiler bug, I just found out our 2015.04 release can't compile all of Open Embedded, whereas a older release worked fine.
- rob -
linaro-toolchain@lists.linaro.org