[commit] r2335 - set LE flag and disable GCC optimisations for FloatMathPlugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[commit] r2335 - set LE flag and disable GCC optimisations for FloatMathPlugin

commits-3
 
Author: piumarta
Date: 2010-12-30 17:48:33 -0800 (Thu, 30 Dec 2010)
New Revision: 2335

Modified:
   trunk/platforms/unix/ChangeLog
   trunk/platforms/unix/plugins/FloatMathPlugin/config.cmake
Log:
set LE flag and disable GCC optimisations for FloatMathPlugin

Modified: trunk/platforms/unix/ChangeLog
===================================================================
--- trunk/platforms/unix/ChangeLog 2010-12-31 01:21:36 UTC (rev 2334)
+++ trunk/platforms/unix/ChangeLog 2010-12-31 01:48:33 UTC (rev 2335)
@@ -1,3 +1,8 @@
+2010-12-31  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>
+
+ * plugins/FloatMathPlugin/config.cmake: Set little-endian flag
+ explicitly.  Disable GCC optimisations.
+
 2010-08-06  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>
 
  * vm-display-X11/config.cmake: Manually check for Xrender library.

Modified: trunk/platforms/unix/plugins/FloatMathPlugin/config.cmake
===================================================================
--- trunk/platforms/unix/plugins/FloatMathPlugin/config.cmake 2010-12-31 01:21:36 UTC (rev 2334)
+++ trunk/platforms/unix/plugins/FloatMathPlugin/config.cmake 2010-12-31 01:48:33 UTC (rev 2335)
@@ -1 +1,14 @@
 PLUGIN_DEFINITIONS (-DNO_ISNAN=1)
+
+# fdlibm.h does not recognize x86_64, so set endianness here for all platforms.
+
+TEST_BIG_ENDIAN (IS_BIG_ENDIAN)
+IF (NOT IS_BIG_ENDIAN)
+  PLUGIN_DEFINITIONS (-D__LITTLE_ENDIAN=1)
+ENDIF ()
+
+# GCC optimizations break fdlibm so disable them for now.
+
+IF (CMAKE_COMPILER_IS_GNUCC)
+  SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -mno-fused-madd")
+ENDIF ()