clang default options lead to incorrect code
Bug #1157691 reported by
Bob Wilkinson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Raspbian |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
http://
In brief, by default, clang produces code which links with the -lm library to produce incorrect results on the Pi. If clang is invoked with the -mfpu=vfp option, then it produces correct code. However, this fix is not documented in "man clang"
It seems that http://
To post a comment you must log in.
It sounds to me like clang is not correctly using the hard float ABI. Using -mfpu=vfp is probablly just masking the real problem by making clang do the square root inline rather than using the math library.
I will bring this up with debian after the wheezy release. In the meantime I would suggest using gcc to build c code (out of interest why were you using clang anyway?).