[pgrouting-users] importance of -frounding-math compilation flag?
woklist at kyngchaos.com
Sat Mar 16 17:36:21 PDT 2013
On Mar 16, 2013, at 6:47 PM, Stephen Woodbridge wrote:
> On 3/16/2013 6:20 PM, William Kyngesburye wrote:
>> I'm recompiling pgrouting on OS X Lion, using the clang compiler.
>> clang does not have the -frounding-math option.
>> I found one reference that the clang equivalent is --disable-fpmath,
>> but that just causes and error "unsupported option
>> '--disable-fpmath'". I could find no documentation that clang has or
>> had this option, or something similar.
>> Is the rounding behavior critical?
> I do not know for a fact one way or the other, But I'm guess that this options probably is not critical for MOST pgrouting functions.
> Where it MIGHT be important is for the CGAL library and/or GAUL libraries. CGAL specifically does a lot of math. You might check those packages so see what they do with respect to fp rounding on OS X.
> If anyone knows more about this please correct this AND we should document it somewhere for future reference.
I didn't need to recompile CGAL, so I didn't see a problem there. But I see that it also uses -frounding-math for GCC, but nothing for clang. The changes log does say CGAL fully supports clang as of CGAL 4.1, so maybe rounding behavior is not an issue or the code works around it.
All I could find in GAUL is a macro define for ROUND which looks like proper rounding towards 0.
I found another reference, for CGAL and OSX/clang:
I guess we're screwed, if the rounding behavior is important to compiler optimization in CGAL and pgRouting. (the previous reference for the supposed --disable-fpmath option was from Fink. Never liked Fink.)
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
"We are at war with them. Neither in hatred nor revenge and with no particular pleasure I shall kill every ___ I can until the war is over. That is my duty."
"Don't you even hate 'em?"
"What good would it do if I did? If all the many millions of people of the allied nations devoted an entire year exclusively to hating the ____ it wouldn't kill one ___ nor shorten the war one day."
<Ha, ha> "And it might give 'em all stomach ulcers."
- Tarzan, on war
More information about the Pgrouting-users