Browse Source

makepanda: work around GCC/Eigen double matrix invert bug

Fixes #228
rdb 7 years ago
parent
commit
f84b0840f9
1 changed files with 3 additions and 0 deletions
  1. 3 0
      makepanda/makepanda.py

+ 3 - 0
makepanda/makepanda.py

@@ -1351,6 +1351,9 @@ def CompileCxx(obj,src,opts):
             # Fast math is nice, but we'd like to see NaN in dev builds.
             # Fast math is nice, but we'd like to see NaN in dev builds.
             cmd += " -fno-finite-math-only"
             cmd += " -fno-finite-math-only"
 
 
+        # Make sure this is off to avoid GCC/Eigen bug (see GitHub #228)
+        cmd += " -fno-unsafe-math-optimizations"
+
         if (optlevel==1): cmd += " -ggdb -D_DEBUG"
         if (optlevel==1): cmd += " -ggdb -D_DEBUG"
         if (optlevel==2): cmd += " -O1 -D_DEBUG"
         if (optlevel==2): cmd += " -O1 -D_DEBUG"
         if (optlevel==3): cmd += " -O2"
         if (optlevel==3): cmd += " -O2"