Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clang 5.1 fpmath

Tags:

macos

clang

I am trying to compile a program with Clang 5.1, as included in Xcode 5.1. This program is an early-stage boot loader, and as such its execution environment is very limited. I must pass the -mfpmath=387 compiler flag to produce correct assembly. When I upgraded to Xcode 5.1, I received the following error:

error: the '387' unit is not supported with this instruction set

Does anyone know what this error means? Did the syntax for this flag change, and, if so, what is the new syntax? (I am also interested in knowing what -mfpmath=387 does. I copied it verbatim from a Makefile in boot-132, but never really understood its effect on the compilation procedure.)

like image 340
wjk Avatar asked Mar 22 '14 17:03

wjk


1 Answers

As it turns out, for Clang to accept -mfpmath=387, I had to also pass -mno-sse. I found this out by grepping Clang’s source. I still want to know what -mfpmath=387 does, though.

like image 122
wjk Avatar answered Sep 29 '22 23:09

wjk