What's the difference between hard and soft floating point numbers?

Evan Kroske picture Evan Kroske · Jul 23, 2010 · Viewed 66.6k times · Source

When I compile C code with my cross toolchain, the linker prints pages of warnings saying that my executable uses hard floats but my libc uses soft floats. What's the difference?

Answer

nmichaels picture nmichaels · Jul 23, 2010

Hard floats use an on-chip floating point unit. Soft floats emulate one in software. The difference is speed. It's strange to see both used on the same target architecture, since the chip either has an FPU or doesn't. You can enable soft floating point in GCC with -msoft-float. You may want to recompile your libc to use hardware floating point if you use it.