No, software compiled for hardfp will not work on a softfp system, as the calling conventions are different - the soft float conventions involve passing floats through integer registers (though technically, the kernel isn't the real issue - the problem is the linker and all of the standard libraries). This is why the Raspbian project was such a big undertaking, as everything needs to be hardfp from the ground up. However, now that we have an official Raspbian image with full hardfp support, there doesn't seem to be any reason to develop for softfp systems any more. I would suggest changing your toolchain to generate hardfp, using gcc options like:
gcc -O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard
as this should generate code suitable for use with the new Raspbian image. The march flag specifies the processor family, and the mfpu and mfloat flags specify that hard float instructions and calling conventions can and should be used.
As an alternative to the -march flag, you could instead use "-mcpu=arm1176jzf-s", which specifies the actual chip used in the Pi.
gcc
, do you still have to specifymarch
etc? – Alex Chamberlain Jul 18 '12 at 10:37gcc -march=armv6 -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard --version
errors out. – Alex Chamberlain Jul 18 '12 at 11:39