How to completely disable floating-point support

R. Diez rdiezmail-gcc@yahoo.de
Fri Jul 8 08:27:00 GMT 2011


Hi there:
 
I am building a GCC 4.5.3 cross-compiler for an embedded PowerPC target, together with binutils-2.21 and newlib 1.19.0, and I wish to completely disable floating-point support.

If I inadvertently try to use some floating-point feature, I wish to get some compilation or link error. At the moment, with GCC/newlib, the compiler seems to use the software emulation without warning, making the resulting binary bigger and slower. It is often the case that I could replace those floating-point calculations with integer alternatives, only if I knew where they all are.

Apparently, newlib does not have the capability to drop floating-point functions like atof from the library, but I wonder if that would work at all, or it GCC would then fail to build when those routines are missing from the C runtime library.

Please copy me on the answer, as I'm not subscribed to this list.

Many thanks,
  R. Diez



More information about the Gcc-help mailing list