The Difference Between HardFP and SoftFP
Raspberry Pi main chip is Broadcom BCM2835, and it's a SoC (System-on-Chip). This SoC includes CPU, GPU and RAM. CPU is ARM1176JZF-S 700 MHz processor, capable of doing floating point math in hardware, including VFP extensions (Vector Floating Point), somewhat similar to x86 SIMD called SSE2.
But hardware floating point on ARM architecture at large is optional feature, so there is a default ABI (Application Binary Interface) between applications and C runtime library assuming that there's no floating point support in hardware. All floating point math is emulated in software, so it works slow, but widely complatible among ARM chips and Linux kernels. This ABI is called SoftFP. Most of GNU/Linux distributions for Raspberry Pi, including Debian Wheezy, are using this slow SoftFP ABI.
HardFP-enabled GNU/Linux distributions like Raspbian Wheezy work much faster when it comes to intensive floating-point computations, like games, but they require special patched eglibc and special patched gcc capable of producing binaries tied to HardFP loader (ld-linux-armhf.so.3) instead of default SoftFP loader (ld-linux.so.3).
When it comes to cross-compiling for Raspberry Pi, HardFP patches for gcc and eglibc must be applied too; but there's also a requirement to build SoftFP toolchain in order to support non-accelerated GNU/Linux distributions without ld-linux-armhf.so.3 and in order to fall back to software emulation if something related to the new HardFP ABI goes wrong.
Summary:
SoftFP ABI | HardFP ABI | |
CPU supports floating point instructions | Yes | Yes |
Floating point instructions are emitted by GCC | No | Yes |
Games and other computationally intensive software is | Slow | Fast |
Register calling convention for libc and other *.so functions | arm-linux-gnueabi | arm-linux-gnueabihf |
Dynamic loader | ld-linux.so.3 | ld-linux-armhf.so.3 |
GCC configuration options | --with-float=soft | --with-float=hard --with-fpu=vfp |
>> Read next section or
buy already prepared
cross-compiler (€10) to save your time.