2014-02-16

slitaz-armhf-cross-toolchain VS. RaspberryPi-toolchain

slitaz-armhf-cross-toolchain VS. RaspberryPi-toolchain

1c. How does arm-slitaz-linux-gnueabi-* compare to other cross compilers such as arm-bcm2708-linux-gnueabi from
https://github.com/raspberrypi/tools/tree/master/arm-bcm2708
slitaz-armhf-cross-toolchain
slitaz-arm-toolchain-armhf-20120630.tar.bz2
Target: arm-slitaz-linux-gnueabi
--with-sysroot=/cross/arm/sysroot --with-arch=armv6 --with-fpu=vfp --with-float=hard

-march=armv6
-mfpu=vfp
-mfloat-abi=hard

These settings produce code with armv6 specific instructions, vector floating point instructions and specify the ARM EABI where floating point values are to be passed in floating point registers.


I. RaspberryPi toolchain
1. History for tools/arm-bcm2708
https://github.com/raspberrypi/tools/commits/master/arm-bcm2708
Jan 31, 2014
Update linaro gcc toolchain to: gcc-linaro-arm-linux-gnueabihf-raspbi… …
Aug 29, 2012
Add latest linaro gcc toolchain: gcc-linaro-arm-linux-gnueabihf-raspb… …
Aug 09, 2012
Rebuild with CT_KERNEL_VERSION=3.1.9
Jul 23, 2012
Rebuild toolchains with glibc 2.13 to match Wheezy image
3d08213d83341b274857c03b2e0795bffcd59715
Jul 21, 2012
Switch to 32-bit versions of gcc 4.7.1 for softfp and hardfp
ea20f345ee105aa89cce11bbcea0525940c38c93
Feb 03, 2012
Add 64 bit hardfp toolchain
3aba47b6f6004755d8b51cd042c4e6c9be64e2ad
Feb 01, 2012
Initial add of R-Pi toolchain
8740395dd92933bfc6ae1da88fd1492f7f194426

2.
R-Pi softfp toolchain
https://github.com/raspberrypi/tools/tree/3aba47b6f6004755d8b51cd042c4e6c9be64e2ad/arm-bcm2708/linux-x86/lib/gcc/arm-bcm2708-linux-gnueabi/4.5.1

64 bit hardfp toolchain
https://github.com/raspberrypi/tools/tree/3aba47b6f6004755d8b51cd042c4e6c9be64e2ad/arm-bcm2708/x86-linux64-cross-arm-linux-hardfp/lib/gcc/arm-bcm2708hardfp-linux-gnueabi/4.5.1


II. Raspbian
1. Raspbian packages
http://raspbian.org/
The initial build of over 35,000 Raspbian packages, optimized for best performance on the Raspberry Pi, was completed in June of 2012.
2. What is Raspbian?
http://raspbian.org/RaspbianFAQ#What_is_Raspbian.3F
Raspbian is an unofficial port of Debian wheezy armhf with compilation settings adjusted to produce code that uses "hardware floating point", the "hard float" ABI and will run on the Raspberry Pi.
The port is necessary because the official Debian wheezy armhf release is compatible only with versions of the ARM architecture later than the one used on the Raspberry Pi (ARMv7-A CPUs and higher, vs the Raspberry Pi's ARMv6 CPU).
The Debian squeeze image issued by the Raspberry Pi foundation was based on debian armel which uses software floating point and the "soft float" ABI. The foundation used the existing Debian port for less capable ARM devices. Therefore, it did not use of the Pi's processor's floating point hardware - reducing the Pi's performance during floating point intensive applications - or the advanced instructions of the ARMv6 CPU.
3. What compilation options should be set Raspbian code?
http://raspbian.org/RaspbianFAQ#What_compilation_options_should_be_set_Raspbian_code.3F
The compiler tools included in the Raspbian repository are, by default, pre-configured to produce code compatible with Raspbian. However, if you are looking to port compiler tools over to Raspbian, the settings required for most GNU tools are as follows:

-march=armv6
-mfpu=vfp
-mfloat-abi=hard

These settings produce code with armv6 specific instructions, vector floating point instructions and specify the ARM EABI where floating point values are to be passed in floating point registers. Additional information can be found in the Debian hard float documents.
http://wiki.debian.org/ArmHardFloatPort