similar clang options for : -mno-80387 -mno-fp-ret-in-387

Hi !

Are there options similar to:


           On machines where a function returns floating-point results in the
           register stack, some floating-point opcodes may be emitted even if
           -msoft-float is used.

           Do not use the FPU registers for return values of functions.

           The usual calling convention has functions return values of types
           and "double" in an FPU register, even if there is no FPU. The idea
           is that
           the operating system should emulate an FPU.

           The option -mno-fp-ret-in-387 causes such values to be returned in
           CPU registers instead.

Or what combination of flags makes sure we won't hit these quirks in the first
place ?


No, we don’t support these options, and I don’t think we’ll want to implement -mno-fp-ret-in-387. To my knowledge, nobody actually needs to return floating point values in GPRs. What the Linux kernel probably wants is to completely disable floating point. In an ideal world, both gcc and clang would grow an -f[no-]floating-point flag, which would reject floating point code in the frontend.