gcc, floating point and linux kernel module

Geoff Keating geoffk@geoffk.org
Fri Jan 5 21:06:00 GMT 2001


christophe barbe <christophe.barbe@inup.com> writes:

> I'm compiling a kernel module for the linux 2.2.18 on a PPC target (MPC750) with the following gcc :
> gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

> The resulting object uses FPU opcode to do optimization for 64 bits
> variables. I've add at the end of this mail the command line to
> compile one of the object included in the module which uses FPU, the
> guilty part of the code and the generated asm.
> 
> It's a bad thing to use FPU in the kernel mode (under linux), so my
> question is is there a way to turn of FPU usage ?

Use the -msoft-float option to GCC, that tells it not to use the FPU
under any circumstances.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


More information about the Gcc-patches mailing list