Reputation: 1249
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.)
Upvotes: 6
Views: 1471
Reputation: 5473
Educated guess:
The 387 refers to the intel x87 floating point instruction set http://en.wikipedia.org/wiki/X87 (hence the 'fpmath' bit of the compiler flag).
It's likely that the flag is telling the compiler to generate code targeting the 387 floating point architecture, rather than a later version.
Upvotes: 1
Reputation: 1249
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.
Upvotes: 6