Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Newbie problem with gcc 4.2 compiler (Mac OSX): fpu_control.h: No such file or directory

Tags:

c++

c

gcc

fpu

I am trying to compile a program in c/c++, but am getting the error message:

fpu_control.h: No such file or directory

From google, I have found out that this problem is about the way floating point precision is handled. I read that not all distributions of gcc include fpu_control.h.

This is the only thing I can find out. I have searched extensively and cannot find anywhere to download this fpu_control.h. Can anyone help?

Thank you all.

like image 793
Ant Avatar asked Nov 24 '10 21:11

Ant


1 Answers

Apple doesn't support setting the FPU flags, and doing so isn't needed. The reason is that they don't even use the i387 coprocessor for float and double, but SSE. The last reference also explains how to revert that approach, and how to perform FPU control using inline assembly.

like image 141
Martin v. Löwis Avatar answered Oct 20 '22 18:10

Martin v. Löwis